1#[cfg(not(feature = "std"))]
20use alloc::{
21 boxed::Box,
22 format,
23 string::{String, ToString},
24 vec,
25 vec::Vec,
26};
27use helpers::{
28 attached_token::AttachedToken,
29 stmt_data_loading::{FileStagingCommand, StageLoadSelectItemKind},
30};
31
32use core::cmp::Ordering;
33use core::ops::Deref;
34use core::{
35 fmt::{self, Display},
36 hash,
37};
38
39#[cfg(feature = "serde")]
40use serde::{Deserialize, Serialize};
41
42#[cfg(feature = "visitor")]
43use sqlparser_derive::{Visit, VisitMut};
44
45use crate::{
46 display_utils::{indented_list, SpaceOrNewline},
47 tokenizer::{Span, Token},
48};
49use crate::{
50 display_utils::{Indent, NewLine},
51 keywords::Keyword,
52};
53
54pub use self::data_type::{
55 ArrayElemTypeDef, BinaryLength, CharLengthUnits, CharacterLength, DataType, EnumMember,
56 ExactNumberInfo, IntervalFields, StructBracketKind, TimezoneInfo,
57};
58pub use self::dcl::{
59 AlterRoleOperation, ResetConfig, RoleOption, SecondaryRoles, SetConfigValue, Use,
60};
61pub use self::ddl::{
62 AlterColumnOperation, AlterConnectorOwner, AlterIndexOperation, AlterPolicyOperation,
63 AlterSchema, AlterSchemaOperation, AlterTableAlgorithm, AlterTableLock, AlterTableOperation,
64 AlterType, AlterTypeAddValue, AlterTypeAddValuePosition, AlterTypeOperation, AlterTypeRename,
65 AlterTypeRenameValue, ClusteredBy, ColumnDef, ColumnOption, ColumnOptionDef, ColumnOptions,
66 ColumnPolicy, ColumnPolicyProperty, ConstraintCharacteristics, CreateConnector, CreateDomain,
67 CreateFunction, CreateIndex, CreateTable, CreateTrigger, Deduplicate, DeferrableInitial,
68 DropBehavior, DropTrigger, GeneratedAs, GeneratedExpressionMode, IdentityParameters,
69 IdentityProperty, IdentityPropertyFormatKind, IdentityPropertyKind, IdentityPropertyOrder,
70 IndexColumn, IndexOption, IndexType, KeyOrIndexDisplay, NullsDistinctOption, Owner, Partition,
71 ProcedureParam, ReferentialAction, RenameTableNameKind, ReplicaIdentity, TableConstraint,
72 TagsColumnOption, UserDefinedTypeCompositeAttributeDef, UserDefinedTypeRepresentation,
73 ViewColumnDef,
74};
75pub use self::dml::{Delete, Insert};
76pub use self::operator::{BinaryOperator, UnaryOperator};
77pub use self::query::{
78 AfterMatchSkip, ConnectBy, Cte, CteAsMaterialized, Distinct, EmptyMatchesMode,
79 ExceptSelectItem, ExcludeSelectItem, ExprWithAlias, ExprWithAliasAndOrderBy, Fetch, ForClause,
80 ForJson, ForXml, FormatClause, GroupByExpr, GroupByWithModifier, IdentWithAlias,
81 IlikeSelectItem, InputFormatClause, Interpolate, InterpolateExpr, Join, JoinConstraint,
82 JoinOperator, JsonTableColumn, JsonTableColumnErrorHandling, JsonTableNamedColumn,
83 JsonTableNestedColumn, LateralView, LimitClause, LockClause, LockType, MatchRecognizePattern,
84 MatchRecognizeSymbol, Measure, NamedWindowDefinition, NamedWindowExpr, NonBlock, Offset,
85 OffsetRows, OpenJsonTableColumn, OrderBy, OrderByExpr, OrderByKind, OrderByOptions,
86 PipeOperator, PivotValueSource, ProjectionSelect, Query, RenameSelectItem,
87 RepetitionQuantifier, ReplaceSelectElement, ReplaceSelectItem, RowsPerMatch, Select,
88 SelectFlavor, SelectInto, SelectItem, SelectItemQualifiedWildcardKind, SetExpr, SetOperator,
89 SetQuantifier, Setting, SymbolDefinition, Table, TableAlias, TableAliasColumnDef, TableFactor,
90 TableFunctionArgs, TableIndexHintForClause, TableIndexHintType, TableIndexHints,
91 TableIndexType, TableSample, TableSampleBucket, TableSampleKind, TableSampleMethod,
92 TableSampleModifier, TableSampleQuantity, TableSampleSeed, TableSampleSeedModifier,
93 TableSampleUnit, TableVersion, TableWithJoins, Top, TopQuantity, UpdateTableFromKind,
94 ValueTableMode, Values, WildcardAdditionalOptions, With, WithFill, XmlNamespaceDefinition,
95 XmlPassingArgument, XmlPassingClause, XmlTableColumn, XmlTableColumnOption,
96};
97
98pub use self::trigger::{
99 TriggerEvent, TriggerExecBody, TriggerExecBodyType, TriggerObject, TriggerPeriod,
100 TriggerReferencing, TriggerReferencingType,
101};
102
103pub use self::value::{
104 escape_double_quote_string, escape_quoted_string, DateTimeField, DollarQuotedString,
105 NormalizationForm, TrimWhereField, Value, ValueWithSpan,
106};
107
108use crate::ast::helpers::key_value_options::KeyValueOptions;
109use crate::ast::helpers::stmt_data_loading::StageParamsObject;
110
111#[cfg(feature = "visitor")]
112pub use visitor::*;
113
114pub use self::data_type::GeometricTypeKind;
115
116mod data_type;
117mod dcl;
118mod ddl;
119mod dml;
120pub mod helpers;
121mod operator;
122mod query;
123mod spans;
124pub use spans::Spanned;
125
126mod trigger;
127mod value;
128
129#[cfg(feature = "visitor")]
130mod visitor;
131
132pub struct DisplaySeparated<'a, T>
133where
134 T: fmt::Display,
135{
136 slice: &'a [T],
137 sep: &'static str,
138}
139
140impl<T> fmt::Display for DisplaySeparated<'_, T>
141where
142 T: fmt::Display,
143{
144 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
145 let mut delim = "";
146 for t in self.slice {
147 f.write_str(delim)?;
148 delim = self.sep;
149 t.fmt(f)?;
150 }
151 Ok(())
152 }
153}
154
155pub fn display_separated<'a, T>(slice: &'a [T], sep: &'static str) -> DisplaySeparated<'a, T>
156where
157 T: fmt::Display,
158{
159 DisplaySeparated { slice, sep }
160}
161
162pub fn display_comma_separated<T>(slice: &[T]) -> DisplaySeparated<'_, T>
163where
164 T: fmt::Display,
165{
166 DisplaySeparated { slice, sep: ", " }
167}
168
169fn format_statement_list(f: &mut fmt::Formatter, statements: &[Statement]) -> fmt::Result {
172 f.write_fmt(format_args!("{0}", display_separated(statements, "; ")))write!(f, "{}", display_separated(statements, "; "))?;
173 f.write_fmt(format_args!(";"))write!(f, ";")
176}
177
178#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Ident {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "Ident",
"value", &self.value, "quote_style", &self.quote_style, "span",
&&self.span)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Ident {
#[inline]
fn clone(&self) -> Ident {
Ident {
value: ::core::clone::Clone::clone(&self.value),
quote_style: ::core::clone::Clone::clone(&self.quote_style),
span: ::core::clone::Clone::clone(&self.span),
}
}
}Clone)]
180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
181#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Ident {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.value, visitor)?;
sqlparser::ast::Visit::visit(&self.quote_style, visitor)?;
sqlparser::ast::Visit::visit(&self.span, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Ident {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.quote_style, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.span, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
182pub struct Ident {
183 pub value: String,
185 pub quote_style: Option<char>,
188 pub span: Span,
190}
191
192impl PartialEq for Ident {
193 fn eq(&self, other: &Self) -> bool {
194 let Ident {
195 value,
196 quote_style,
197 span: _,
199 } = self;
200
201 value == &other.value && quote_style == &other.quote_style
202 }
203}
204
205impl core::hash::Hash for Ident {
206 fn hash<H: hash::Hasher>(&self, state: &mut H) {
207 let Ident {
208 value,
209 quote_style,
210 span: _,
212 } = self;
213
214 value.hash(state);
215 quote_style.hash(state);
216 }
217}
218
219impl Eq for Ident {}
220
221impl PartialOrd for Ident {
222 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
223 Some(self.cmp(other))
224 }
225}
226
227impl Ord for Ident {
228 fn cmp(&self, other: &Self) -> Ordering {
229 let Ident {
230 value,
231 quote_style,
232 span: _,
234 } = self;
235
236 let Ident {
237 value: other_value,
238 quote_style: other_quote_style,
239 span: _,
241 } = other;
242
243 value
245 .cmp(other_value)
246 .then_with(|| quote_style.cmp(other_quote_style))
247 }
248}
249
250impl Ident {
251 pub fn new<S>(value: S) -> Self
253 where
254 S: Into<String>,
255 {
256 Ident {
257 value: value.into(),
258 quote_style: None,
259 span: Span::empty(),
260 }
261 }
262
263 pub fn with_quote<S>(quote: char, value: S) -> Self
266 where
267 S: Into<String>,
268 {
269 if !(quote == '\'' || quote == '"' || quote == '`' || quote == '[') {
::core::panicking::panic("assertion failed: quote == \'\\\'\' || quote == \'\"\' || quote == \'`\' || quote == \'[\'")
};assert!(quote == '\'' || quote == '"' || quote == '`' || quote == '[');
270 Ident {
271 value: value.into(),
272 quote_style: Some(quote),
273 span: Span::empty(),
274 }
275 }
276
277 pub fn with_span<S>(span: Span, value: S) -> Self
278 where
279 S: Into<String>,
280 {
281 Ident {
282 value: value.into(),
283 quote_style: None,
284 span,
285 }
286 }
287
288 pub fn with_quote_and_span<S>(quote: char, span: Span, value: S) -> Self
289 where
290 S: Into<String>,
291 {
292 if !(quote == '\'' || quote == '"' || quote == '`' || quote == '[') {
::core::panicking::panic("assertion failed: quote == \'\\\'\' || quote == \'\"\' || quote == \'`\' || quote == \'[\'")
};assert!(quote == '\'' || quote == '"' || quote == '`' || quote == '[');
293 Ident {
294 value: value.into(),
295 quote_style: Some(quote),
296 span,
297 }
298 }
299}
300
301impl From<&str> for Ident {
302 fn from(value: &str) -> Self {
303 Ident {
304 value: value.to_string(),
305 quote_style: None,
306 span: Span::empty(),
307 }
308 }
309}
310
311impl fmt::Display for Ident {
312 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
313 match self.quote_style {
314 Some(q) if q == '"' || q == '\'' || q == '`' => {
315 let escaped = value::escape_quoted_string(&self.value, q);
316 f.write_fmt(format_args!("{0}{1}{0}", q, escaped))write!(f, "{q}{escaped}{q}")
317 }
318 Some('[') => f.write_fmt(format_args!("[{0}]", self.value))write!(f, "[{}]", self.value),
319 None => f.write_str(&self.value),
320 _ => { ::core::panicking::panic_fmt(format_args!("unexpected quote style")); }panic!("unexpected quote style"),
321 }
322 }
323}
324
325#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ObjectName {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field1_finish(f, "ObjectName",
&&self.0)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ObjectName {
#[inline]
fn clone(&self) -> ObjectName {
ObjectName(::core::clone::Clone::clone(&self.0))
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ObjectName {
#[inline]
fn eq(&self, other: &ObjectName) -> bool { self.0 == other.0 }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ObjectName {
#[inline]
fn partial_cmp(&self, other: &ObjectName)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ObjectName {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectNamePart>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ObjectName {
#[inline]
fn cmp(&self, other: &ObjectName) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.0, &other.0)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ObjectName {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.0, state)
}
}Hash)]
327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
328#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ObjectName {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.0, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ObjectName {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.0, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
329pub struct ObjectName(pub Vec<ObjectNamePart>);
330
331impl From<Vec<Ident>> for ObjectName {
332 fn from(idents: Vec<Ident>) -> Self {
333 ObjectName(idents.into_iter().map(ObjectNamePart::Identifier).collect())
334 }
335}
336
337impl fmt::Display for ObjectName {
338 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
339 f.write_fmt(format_args!("{0}", display_separated(&self.0, ".")))write!(f, "{}", display_separated(&self.0, "."))
340 }
341}
342
343#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ObjectNamePart {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ObjectNamePart::Identifier(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Identifier", &__self_0),
ObjectNamePart::Function(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Function", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ObjectNamePart {
#[inline]
fn clone(&self) -> ObjectNamePart {
match self {
ObjectNamePart::Identifier(__self_0) =>
ObjectNamePart::Identifier(::core::clone::Clone::clone(__self_0)),
ObjectNamePart::Function(__self_0) =>
ObjectNamePart::Function(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ObjectNamePart {
#[inline]
fn eq(&self, other: &ObjectNamePart) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(ObjectNamePart::Identifier(__self_0),
ObjectNamePart::Identifier(__arg1_0)) =>
__self_0 == __arg1_0,
(ObjectNamePart::Function(__self_0),
ObjectNamePart::Function(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ObjectNamePart {
#[inline]
fn partial_cmp(&self, other: &ObjectNamePart)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(ObjectNamePart::Identifier(__self_0),
ObjectNamePart::Identifier(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ObjectNamePart::Function(__self_0),
ObjectNamePart::Function(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ObjectNamePart {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<ObjectNamePartFunction>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ObjectNamePart {
#[inline]
fn cmp(&self, other: &ObjectNamePart) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(ObjectNamePart::Identifier(__self_0),
ObjectNamePart::Identifier(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ObjectNamePart::Function(__self_0),
ObjectNamePart::Function(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ObjectNamePart {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
ObjectNamePart::Identifier(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
ObjectNamePart::Function(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
346#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ObjectNamePart {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Identifier(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Function(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ObjectNamePart {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Identifier(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Function(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
347pub enum ObjectNamePart {
348 Identifier(Ident),
349 Function(ObjectNamePartFunction),
350}
351
352impl ObjectNamePart {
353 pub fn as_ident(&self) -> Option<&Ident> {
354 match self {
355 ObjectNamePart::Identifier(ident) => Some(ident),
356 ObjectNamePart::Function(_) => None,
357 }
358 }
359}
360
361impl fmt::Display for ObjectNamePart {
362 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
363 match self {
364 ObjectNamePart::Identifier(ident) => f.write_fmt(format_args!("{0}", ident))write!(f, "{ident}"),
365 ObjectNamePart::Function(func) => f.write_fmt(format_args!("{0}", func))write!(f, "{func}"),
366 }
367 }
368}
369
370#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ObjectNamePartFunction {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"ObjectNamePartFunction", "name", &self.name, "args", &&self.args)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ObjectNamePartFunction {
#[inline]
fn clone(&self) -> ObjectNamePartFunction {
ObjectNamePartFunction {
name: ::core::clone::Clone::clone(&self.name),
args: ::core::clone::Clone::clone(&self.args),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ObjectNamePartFunction {
#[inline]
fn eq(&self, other: &ObjectNamePartFunction) -> bool {
self.name == other.name && self.args == other.args
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ObjectNamePartFunction {
#[inline]
fn partial_cmp(&self, other: &ObjectNamePartFunction)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.args, &other.args),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ObjectNamePartFunction {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Vec<FunctionArg>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ObjectNamePartFunction {
#[inline]
fn cmp(&self, other: &ObjectNamePartFunction) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.args, &other.args),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ObjectNamePartFunction {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.args, state)
}
}Hash)]
375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
376#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ObjectNamePartFunction {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.args, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ObjectNamePartFunction {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.args, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
377pub struct ObjectNamePartFunction {
378 pub name: Ident,
379 pub args: Vec<FunctionArg>,
380}
381
382impl fmt::Display for ObjectNamePartFunction {
383 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
384 f.write_fmt(format_args!("{0}(", self.name))write!(f, "{}(", self.name)?;
385 f.write_fmt(format_args!("{0})", display_comma_separated(&self.args)))write!(f, "{})", display_comma_separated(&self.args))
386 }
387}
388
389#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Array {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "Array", "elem",
&self.elem, "named", &&self.named)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Array {
#[inline]
fn clone(&self) -> Array {
Array {
elem: ::core::clone::Clone::clone(&self.elem),
named: ::core::clone::Clone::clone(&self.named),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Array {
#[inline]
fn eq(&self, other: &Array) -> bool {
self.named == other.named && self.elem == other.elem
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Array {
#[inline]
fn partial_cmp(&self, other: &Array)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.elem, &other.elem) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.named,
&other.named),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Array {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Array {
#[inline]
fn cmp(&self, other: &Array) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.elem, &other.elem) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.named, &other.named),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Array {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.elem, state);
::core::hash::Hash::hash(&self.named, state)
}
}Hash)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Array {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.elem, visitor)?;
sqlparser::ast::Visit::visit(&self.named, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Array {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.elem, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.named, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
394pub struct Array {
395 pub elem: Vec<Expr>,
397
398 pub named: bool,
400}
401
402impl fmt::Display for Array {
403 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
404 f.write_fmt(format_args!("{0}[{1}]", if self.named { "ARRAY" } else { "" },
display_comma_separated(&self.elem)))write!(
405 f,
406 "{}[{}]",
407 if self.named { "ARRAY" } else { "" },
408 display_comma_separated(&self.elem)
409 )
410 }
411}
412
413#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Interval {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field5_finish(f, "Interval",
"value", &self.value, "leading_field", &self.leading_field,
"leading_precision", &self.leading_precision, "last_field",
&self.last_field, "fractional_seconds_precision",
&&self.fractional_seconds_precision)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Interval {
#[inline]
fn clone(&self) -> Interval {
Interval {
value: ::core::clone::Clone::clone(&self.value),
leading_field: ::core::clone::Clone::clone(&self.leading_field),
leading_precision: ::core::clone::Clone::clone(&self.leading_precision),
last_field: ::core::clone::Clone::clone(&self.last_field),
fractional_seconds_precision: ::core::clone::Clone::clone(&self.fractional_seconds_precision),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Interval {
#[inline]
fn eq(&self, other: &Interval) -> bool {
self.value == other.value && self.leading_field == other.leading_field
&& self.leading_precision == other.leading_precision &&
self.last_field == other.last_field &&
self.fractional_seconds_precision ==
other.fractional_seconds_precision
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Interval {
#[inline]
fn partial_cmp(&self, other: &Interval)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.value, &other.value)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.leading_field,
&other.leading_field) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.leading_precision,
&other.leading_precision) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.last_field,
&other.last_field) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.fractional_seconds_precision,
&other.fractional_seconds_precision),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Interval {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<DateTimeField>>;
let _: ::core::cmp::AssertParamIsEq<Option<u64>>;
let _: ::core::cmp::AssertParamIsEq<Option<DateTimeField>>;
let _: ::core::cmp::AssertParamIsEq<Option<u64>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Interval {
#[inline]
fn cmp(&self, other: &Interval) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.value, &other.value) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.leading_field,
&other.leading_field) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.leading_precision,
&other.leading_precision) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.last_field,
&other.last_field) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.fractional_seconds_precision,
&other.fractional_seconds_precision),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Interval {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.value, state);
::core::hash::Hash::hash(&self.leading_field, state);
::core::hash::Hash::hash(&self.leading_precision, state);
::core::hash::Hash::hash(&self.last_field, state);
::core::hash::Hash::hash(&self.fractional_seconds_precision, state)
}
}Hash)]
422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
423#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Interval {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.value, visitor)?;
sqlparser::ast::Visit::visit(&self.leading_field, visitor)?;
sqlparser::ast::Visit::visit(&self.leading_precision, visitor)?;
sqlparser::ast::Visit::visit(&self.last_field, visitor)?;
sqlparser::ast::Visit::visit(&self.fractional_seconds_precision,
visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Interval {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.leading_field, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.leading_precision,
visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.last_field, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.fractional_seconds_precision,
visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
424pub struct Interval {
425 pub value: Box<Expr>,
426 pub leading_field: Option<DateTimeField>,
427 pub leading_precision: Option<u64>,
428 pub last_field: Option<DateTimeField>,
429 pub fractional_seconds_precision: Option<u64>,
434}
435
436impl fmt::Display for Interval {
437 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
438 let value = self.value.as_ref();
439 match (
440 &self.leading_field,
441 self.leading_precision,
442 self.fractional_seconds_precision,
443 ) {
444 (
445 Some(DateTimeField::Second),
446 Some(leading_precision),
447 Some(fractional_seconds_precision),
448 ) => {
449 if !self.last_field.is_none() {
::core::panicking::panic("assertion failed: self.last_field.is_none()")
};assert!(self.last_field.is_none());
452 f.write_fmt(format_args!("INTERVAL {0} SECOND ({1}, {2})", value,
leading_precision, fractional_seconds_precision))write!(
453 f,
454 "INTERVAL {value} SECOND ({leading_precision}, {fractional_seconds_precision})"
455 )
456 }
457 _ => {
458 f.write_fmt(format_args!("INTERVAL {0}", value))write!(f, "INTERVAL {value}")?;
459 if let Some(leading_field) = &self.leading_field {
460 f.write_fmt(format_args!(" {0}", leading_field))write!(f, " {leading_field}")?;
461 }
462 if let Some(leading_precision) = self.leading_precision {
463 f.write_fmt(format_args!(" ({0})", leading_precision))write!(f, " ({leading_precision})")?;
464 }
465 if let Some(last_field) = &self.last_field {
466 f.write_fmt(format_args!(" TO {0}", last_field))write!(f, " TO {last_field}")?;
467 }
468 if let Some(fractional_seconds_precision) = self.fractional_seconds_precision {
469 f.write_fmt(format_args!(" ({0})", fractional_seconds_precision))write!(f, " ({fractional_seconds_precision})")?;
470 }
471 Ok(())
472 }
473 }
474 }
475}
476
477#[derive(#[automatically_derived]
impl ::core::fmt::Debug for StructField {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "StructField",
"field_name", &self.field_name, "field_type", &self.field_type,
"options", &&self.options)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for StructField {
#[inline]
fn clone(&self) -> StructField {
StructField {
field_name: ::core::clone::Clone::clone(&self.field_name),
field_type: ::core::clone::Clone::clone(&self.field_type),
options: ::core::clone::Clone::clone(&self.options),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for StructField {
#[inline]
fn eq(&self, other: &StructField) -> bool {
self.field_name == other.field_name &&
self.field_type == other.field_type &&
self.options == other.options
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for StructField {
#[inline]
fn partial_cmp(&self, other: &StructField)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.field_name,
&other.field_name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.field_type,
&other.field_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.options,
&other.options),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for StructField {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<DataType>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for StructField {
#[inline]
fn cmp(&self, other: &StructField) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.field_name, &other.field_name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.field_type,
&other.field_type) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.options, &other.options),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for StructField {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.field_name, state);
::core::hash::Hash::hash(&self.field_type, state);
::core::hash::Hash::hash(&self.options, state)
}
}Hash)]
481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
482#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for StructField {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.field_name, visitor)?;
sqlparser::ast::Visit::visit(&self.field_type, visitor)?;
sqlparser::ast::Visit::visit(&self.options, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for StructField {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.field_name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.field_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.options, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
483pub struct StructField {
484 pub field_name: Option<Ident>,
485 pub field_type: DataType,
486 pub options: Option<Vec<SqlOption>>,
489}
490
491impl fmt::Display for StructField {
492 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
493 if let Some(name) = &self.field_name {
494 f.write_fmt(format_args!("{1} {0}", self.field_type, name))write!(f, "{name} {}", self.field_type)?;
495 } else {
496 f.write_fmt(format_args!("{0}", self.field_type))write!(f, "{}", self.field_type)?;
497 }
498 if let Some(options) = &self.options {
499 f.write_fmt(format_args!(" OPTIONS({0})", display_separated(options, ", ")))write!(f, " OPTIONS({})", display_separated(options, ", "))
500 } else {
501 Ok(())
502 }
503 }
504}
505
506#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UnionField {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "UnionField",
"field_name", &self.field_name, "field_type", &&self.field_type)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UnionField {
#[inline]
fn clone(&self) -> UnionField {
UnionField {
field_name: ::core::clone::Clone::clone(&self.field_name),
field_type: ::core::clone::Clone::clone(&self.field_type),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UnionField {
#[inline]
fn eq(&self, other: &UnionField) -> bool {
self.field_name == other.field_name &&
self.field_type == other.field_type
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UnionField {
#[inline]
fn partial_cmp(&self, other: &UnionField)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.field_name,
&other.field_name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.field_type,
&other.field_type),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UnionField {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<DataType>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UnionField {
#[inline]
fn cmp(&self, other: &UnionField) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.field_name, &other.field_name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.field_type, &other.field_type),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UnionField {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.field_name, state);
::core::hash::Hash::hash(&self.field_type, state)
}
}Hash)]
510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
511#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UnionField {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.field_name, visitor)?;
sqlparser::ast::Visit::visit(&self.field_type, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for UnionField {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.field_name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.field_type, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
512pub struct UnionField {
513 pub field_name: Ident,
514 pub field_type: DataType,
515}
516
517impl fmt::Display for UnionField {
518 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
519 f.write_fmt(format_args!("{0} {1}", self.field_name, self.field_type))write!(f, "{} {}", self.field_name, self.field_type)
520 }
521}
522
523#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DictionaryField {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"DictionaryField", "key", &self.key, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DictionaryField {
#[inline]
fn clone(&self) -> DictionaryField {
DictionaryField {
key: ::core::clone::Clone::clone(&self.key),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DictionaryField {
#[inline]
fn eq(&self, other: &DictionaryField) -> bool {
self.key == other.key && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DictionaryField {
#[inline]
fn partial_cmp(&self, other: &DictionaryField)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.key, &other.key) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DictionaryField {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DictionaryField {
#[inline]
fn cmp(&self, other: &DictionaryField) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.key, &other.key) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DictionaryField {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.key, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
528#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DictionaryField {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.key, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DictionaryField {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.key, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
529pub struct DictionaryField {
530 pub key: Ident,
531 pub value: Box<Expr>,
532}
533
534impl fmt::Display for DictionaryField {
535 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
536 f.write_fmt(format_args!("{0}: {1}", self.key, self.value))write!(f, "{}: {}", self.key, self.value)
537 }
538}
539
540#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Map {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f, "Map",
"entries", &&self.entries)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Map {
#[inline]
fn clone(&self) -> Map {
Map { entries: ::core::clone::Clone::clone(&self.entries) }
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Map {
#[inline]
fn eq(&self, other: &Map) -> bool { self.entries == other.entries }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Map {
#[inline]
fn partial_cmp(&self, other: &Map)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.entries, &other.entries)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Map {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<MapEntry>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Map {
#[inline]
fn cmp(&self, other: &Map) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.entries, &other.entries)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Map {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.entries, state)
}
}Hash)]
542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
543#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Map {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.entries, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Map {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.entries, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
544pub struct Map {
545 pub entries: Vec<MapEntry>,
546}
547
548impl Display for Map {
549 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
550 f.write_fmt(format_args!("MAP {{{0}}}",
display_comma_separated(&self.entries)))write!(f, "MAP {{{}}}", display_comma_separated(&self.entries))
551 }
552}
553
554#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MapEntry {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "MapEntry",
"key", &self.key, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MapEntry {
#[inline]
fn clone(&self) -> MapEntry {
MapEntry {
key: ::core::clone::Clone::clone(&self.key),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MapEntry {
#[inline]
fn eq(&self, other: &MapEntry) -> bool {
self.key == other.key && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MapEntry {
#[inline]
fn partial_cmp(&self, other: &MapEntry)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.key, &other.key) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MapEntry {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MapEntry {
#[inline]
fn cmp(&self, other: &MapEntry) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.key, &other.key) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MapEntry {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.key, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
558#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
559#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MapEntry {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.key, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MapEntry {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.key, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
560pub struct MapEntry {
561 pub key: Box<Expr>,
562 pub value: Box<Expr>,
563}
564
565impl fmt::Display for MapEntry {
566 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
567 f.write_fmt(format_args!("{0}: {1}", self.key, self.value))write!(f, "{}: {}", self.key, self.value)
568 }
569}
570
571#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CastFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CastFormat::Value(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Value",
&__self_0),
CastFormat::ValueAtTimeZone(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"ValueAtTimeZone", __self_0, &__self_1),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CastFormat {
#[inline]
fn clone(&self) -> CastFormat {
match self {
CastFormat::Value(__self_0) =>
CastFormat::Value(::core::clone::Clone::clone(__self_0)),
CastFormat::ValueAtTimeZone(__self_0, __self_1) =>
CastFormat::ValueAtTimeZone(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CastFormat {
#[inline]
fn eq(&self, other: &CastFormat) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CastFormat::Value(__self_0), CastFormat::Value(__arg1_0)) =>
__self_0 == __arg1_0,
(CastFormat::ValueAtTimeZone(__self_0, __self_1),
CastFormat::ValueAtTimeZone(__arg1_0, __arg1_1)) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CastFormat {
#[inline]
fn partial_cmp(&self, other: &CastFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CastFormat::Value(__self_0), CastFormat::Value(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CastFormat::ValueAtTimeZone(__self_0, __self_1),
CastFormat::ValueAtTimeZone(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CastFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Value>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CastFormat {
#[inline]
fn cmp(&self, other: &CastFormat) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CastFormat::Value(__self_0), CastFormat::Value(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CastFormat::ValueAtTimeZone(__self_0, __self_1),
CastFormat::ValueAtTimeZone(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CastFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CastFormat::Value(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CastFormat::ValueAtTimeZone(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
}
}
}Hash)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CastFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Value(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::ValueAtTimeZone(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CastFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Value(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ValueAtTimeZone(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
576pub enum CastFormat {
577 Value(Value),
578 ValueAtTimeZone(Value, Value),
579}
580
581#[derive(#[automatically_derived]
impl ::core::fmt::Debug for JsonPathElem {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
JsonPathElem::Dot { key: __self_0, quoted: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "Dot",
"key", __self_0, "quoted", &__self_1),
JsonPathElem::Bracket { key: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Bracket", "key", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for JsonPathElem {
#[inline]
fn clone(&self) -> JsonPathElem {
match self {
JsonPathElem::Dot { key: __self_0, quoted: __self_1 } =>
JsonPathElem::Dot {
key: ::core::clone::Clone::clone(__self_0),
quoted: ::core::clone::Clone::clone(__self_1),
},
JsonPathElem::Bracket { key: __self_0 } =>
JsonPathElem::Bracket {
key: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for JsonPathElem {
#[inline]
fn eq(&self, other: &JsonPathElem) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(JsonPathElem::Dot { key: __self_0, quoted: __self_1 },
JsonPathElem::Dot { key: __arg1_0, quoted: __arg1_1 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
(JsonPathElem::Bracket { key: __self_0 },
JsonPathElem::Bracket { key: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for JsonPathElem {
#[inline]
fn partial_cmp(&self, other: &JsonPathElem)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(JsonPathElem::Dot { key: __self_0, quoted: __self_1 },
JsonPathElem::Dot { key: __arg1_0, quoted: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(JsonPathElem::Bracket { key: __self_0 }, JsonPathElem::Bracket {
key: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for JsonPathElem {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for JsonPathElem {
#[inline]
fn cmp(&self, other: &JsonPathElem) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(JsonPathElem::Dot { key: __self_0, quoted: __self_1 },
JsonPathElem::Dot { key: __arg1_0, quoted: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(JsonPathElem::Bracket { key: __self_0 },
JsonPathElem::Bracket { key: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for JsonPathElem {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
JsonPathElem::Dot { key: __self_0, quoted: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
JsonPathElem::Bracket { key: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
584#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for JsonPathElem {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Dot { key, quoted } => {
sqlparser::ast::Visit::visit(key, visitor)?;
sqlparser::ast::Visit::visit(quoted, visitor)?;
}
Self::Bracket { key } => {
sqlparser::ast::Visit::visit(key, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for JsonPathElem {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Dot { key, quoted } => {
sqlparser::ast::VisitMut::visit(key, visitor)?;
sqlparser::ast::VisitMut::visit(quoted, visitor)?;
}
Self::Bracket { key } => {
sqlparser::ast::VisitMut::visit(key, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
585pub enum JsonPathElem {
586 Dot { key: String, quoted: bool },
590 Bracket { key: Expr },
595}
596
597#[derive(#[automatically_derived]
impl ::core::fmt::Debug for JsonPath {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f, "JsonPath",
"path", &&self.path)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for JsonPath {
#[inline]
fn clone(&self) -> JsonPath {
JsonPath { path: ::core::clone::Clone::clone(&self.path) }
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for JsonPath {
#[inline]
fn eq(&self, other: &JsonPath) -> bool { self.path == other.path }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for JsonPath {
#[inline]
fn partial_cmp(&self, other: &JsonPath)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.path, &other.path)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for JsonPath {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<JsonPathElem>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for JsonPath {
#[inline]
fn cmp(&self, other: &JsonPath) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.path, &other.path)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for JsonPath {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.path, state)
}
}Hash)]
602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
603#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for JsonPath {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.path, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for JsonPath {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.path, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
604pub struct JsonPath {
605 pub path: Vec<JsonPathElem>,
606}
607
608impl fmt::Display for JsonPath {
609 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
610 for (i, elem) in self.path.iter().enumerate() {
611 match elem {
612 JsonPathElem::Dot { key, quoted } => {
613 if i == 0 {
614 f.write_fmt(format_args!(":"))write!(f, ":")?;
615 } else {
616 f.write_fmt(format_args!("."))write!(f, ".")?;
617 }
618
619 if *quoted {
620 f.write_fmt(format_args!("\"{0}\"", escape_double_quote_string(key)))write!(f, "\"{}\"", escape_double_quote_string(key))?;
621 } else {
622 f.write_fmt(format_args!("{0}", key))write!(f, "{key}")?;
623 }
624 }
625 JsonPathElem::Bracket { key } => {
626 f.write_fmt(format_args!("[{0}]", key))write!(f, "[{key}]")?;
627 }
628 }
629 }
630 Ok(())
631 }
632}
633
634#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CastKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CastKind::Cast => "Cast",
CastKind::TryCast => "TryCast",
CastKind::SafeCast => "SafeCast",
CastKind::DoubleColon => "DoubleColon",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CastKind {
#[inline]
fn clone(&self) -> CastKind {
match self {
CastKind::Cast => CastKind::Cast,
CastKind::TryCast => CastKind::TryCast,
CastKind::SafeCast => CastKind::SafeCast,
CastKind::DoubleColon => CastKind::DoubleColon,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CastKind {
#[inline]
fn eq(&self, other: &CastKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CastKind {
#[inline]
fn partial_cmp(&self, other: &CastKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CastKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CastKind {
#[inline]
fn cmp(&self, other: &CastKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CastKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
637#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CastKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Cast => {}
Self::TryCast => {}
Self::SafeCast => {}
Self::DoubleColon => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CastKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Cast => {}
Self::TryCast => {}
Self::SafeCast => {}
Self::DoubleColon => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
638pub enum CastKind {
639 Cast,
641 TryCast,
646 SafeCast,
650 DoubleColon,
652}
653
654#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ExtractSyntax {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ExtractSyntax::From => "From",
ExtractSyntax::Comma => "Comma",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ExtractSyntax {
#[inline]
fn clone(&self) -> ExtractSyntax {
match self {
ExtractSyntax::From => ExtractSyntax::From,
ExtractSyntax::Comma => ExtractSyntax::Comma,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ExtractSyntax {
#[inline]
fn eq(&self, other: &ExtractSyntax) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ExtractSyntax {
#[inline]
fn partial_cmp(&self, other: &ExtractSyntax)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ExtractSyntax {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ExtractSyntax {
#[inline]
fn cmp(&self, other: &ExtractSyntax) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ExtractSyntax {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ExtractSyntax {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::From => {} Self::Comma => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ExtractSyntax {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::From => {} Self::Comma => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
663pub enum ExtractSyntax {
664 From,
666 Comma,
668}
669
670#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CeilFloorKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CeilFloorKind::DateTimeField(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DateTimeField", &__self_0),
CeilFloorKind::Scale(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Scale",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CeilFloorKind {
#[inline]
fn clone(&self) -> CeilFloorKind {
match self {
CeilFloorKind::DateTimeField(__self_0) =>
CeilFloorKind::DateTimeField(::core::clone::Clone::clone(__self_0)),
CeilFloorKind::Scale(__self_0) =>
CeilFloorKind::Scale(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CeilFloorKind {
#[inline]
fn eq(&self, other: &CeilFloorKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CeilFloorKind::DateTimeField(__self_0),
CeilFloorKind::DateTimeField(__arg1_0)) =>
__self_0 == __arg1_0,
(CeilFloorKind::Scale(__self_0),
CeilFloorKind::Scale(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CeilFloorKind {
#[inline]
fn partial_cmp(&self, other: &CeilFloorKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CeilFloorKind::DateTimeField(__self_0),
CeilFloorKind::DateTimeField(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CeilFloorKind::Scale(__self_0), CeilFloorKind::Scale(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CeilFloorKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<DateTimeField>;
let _: ::core::cmp::AssertParamIsEq<Value>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CeilFloorKind {
#[inline]
fn cmp(&self, other: &CeilFloorKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CeilFloorKind::DateTimeField(__self_0),
CeilFloorKind::DateTimeField(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CeilFloorKind::Scale(__self_0),
CeilFloorKind::Scale(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CeilFloorKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CeilFloorKind::DateTimeField(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CeilFloorKind::Scale(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
680#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CeilFloorKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DateTimeField(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Scale(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CeilFloorKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DateTimeField(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Scale(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
681pub enum CeilFloorKind {
682 DateTimeField(DateTimeField),
684 Scale(Value),
686}
687
688#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CaseWhen {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "CaseWhen",
"condition", &self.condition, "result", &&self.result)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CaseWhen {
#[inline]
fn clone(&self) -> CaseWhen {
CaseWhen {
condition: ::core::clone::Clone::clone(&self.condition),
result: ::core::clone::Clone::clone(&self.result),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CaseWhen {
#[inline]
fn eq(&self, other: &CaseWhen) -> bool {
self.condition == other.condition && self.result == other.result
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CaseWhen {
#[inline]
fn partial_cmp(&self, other: &CaseWhen)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.condition,
&other.condition) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.result,
&other.result),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CaseWhen {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CaseWhen {
#[inline]
fn cmp(&self, other: &CaseWhen) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.condition, &other.condition) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.result, &other.result),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CaseWhen {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.condition, state);
::core::hash::Hash::hash(&self.result, state)
}
}Hash)]
691#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
692#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CaseWhen {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.condition, visitor)?;
sqlparser::ast::Visit::visit(&self.result, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CaseWhen {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.condition, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.result, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
693pub struct CaseWhen {
694 pub condition: Expr,
695 pub result: Expr,
696}
697
698impl fmt::Display for CaseWhen {
699 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
700 f.write_str("WHEN ")?;
701 self.condition.fmt(f)?;
702 f.write_str(" THEN")?;
703 SpaceOrNewline.fmt(f)?;
704 Indent(&self.result).fmt(f)?;
705 Ok(())
706 }
707}
708
709#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Expr {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Expr::Identifier(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Identifier", &__self_0),
Expr::CompoundIdentifier(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CompoundIdentifier", &__self_0),
Expr::CompoundFieldAccess { root: __self_0, access_chain: __self_1
} =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"CompoundFieldAccess", "root", __self_0, "access_chain",
&__self_1),
Expr::JsonAccess { value: __self_0, path: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"JsonAccess", "value", __self_0, "path", &__self_1),
Expr::IsFalse(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsFalse", &__self_0),
Expr::IsNotFalse(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsNotFalse", &__self_0),
Expr::IsTrue(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "IsTrue",
&__self_0),
Expr::IsNotTrue(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsNotTrue", &__self_0),
Expr::IsNull(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "IsNull",
&__self_0),
Expr::IsNotNull(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsNotNull", &__self_0),
Expr::IsUnknown(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsUnknown", &__self_0),
Expr::IsNotUnknown(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsNotUnknown", &__self_0),
Expr::IsDistinctFrom(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"IsDistinctFrom", __self_0, &__self_1),
Expr::IsNotDistinctFrom(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"IsNotDistinctFrom", __self_0, &__self_1),
Expr::IsNormalized {
expr: __self_0, form: __self_1, negated: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"IsNormalized", "expr", __self_0, "form", __self_1,
"negated", &__self_2),
Expr::InList { expr: __self_0, list: __self_1, negated: __self_2 }
=>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"InList", "expr", __self_0, "list", __self_1, "negated",
&__self_2),
Expr::InSubquery {
expr: __self_0, subquery: __self_1, negated: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"InSubquery", "expr", __self_0, "subquery", __self_1,
"negated", &__self_2),
Expr::InUnnest {
expr: __self_0, array_expr: __self_1, negated: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"InUnnest", "expr", __self_0, "array_expr", __self_1,
"negated", &__self_2),
Expr::Between {
expr: __self_0,
negated: __self_1,
low: __self_2,
high: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"Between", "expr", __self_0, "negated", __self_1, "low",
__self_2, "high", &__self_3),
Expr::BinaryOp { left: __self_0, op: __self_1, right: __self_2 }
=>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"BinaryOp", "left", __self_0, "op", __self_1, "right",
&__self_2),
Expr::Like {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f, "Like",
"negated", __self_0, "any", __self_1, "expr", __self_2,
"pattern", __self_3, "escape_char", &__self_4),
Expr::ILike {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f, "ILike",
"negated", __self_0, "any", __self_1, "expr", __self_2,
"pattern", __self_3, "escape_char", &__self_4),
Expr::SimilarTo {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
escape_char: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"SimilarTo", "negated", __self_0, "expr", __self_1,
"pattern", __self_2, "escape_char", &__self_3),
Expr::RLike {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
regexp: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f, "RLike",
"negated", __self_0, "expr", __self_1, "pattern", __self_2,
"regexp", &__self_3),
Expr::AnyOp {
left: __self_0,
compare_op: __self_1,
right: __self_2,
is_some: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f, "AnyOp",
"left", __self_0, "compare_op", __self_1, "right", __self_2,
"is_some", &__self_3),
Expr::AllOp {
left: __self_0, compare_op: __self_1, right: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f, "AllOp",
"left", __self_0, "compare_op", __self_1, "right",
&__self_2),
Expr::UnaryOp { op: __self_0, expr: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"UnaryOp", "op", __self_0, "expr", &__self_1),
Expr::Convert {
is_try: __self_0,
expr: __self_1,
data_type: __self_2,
charset: __self_3,
target_before_value: __self_4,
styles: __self_5 } => {
let names: &'static _ =
&["is_try", "expr", "data_type", "charset",
"target_before_value", "styles"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Convert", names, values)
}
Expr::Cast {
kind: __self_0,
expr: __self_1,
data_type: __self_2,
format: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f, "Cast",
"kind", __self_0, "expr", __self_1, "data_type", __self_2,
"format", &__self_3),
Expr::AtTimeZone { timestamp: __self_0, time_zone: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"AtTimeZone", "timestamp", __self_0, "time_zone",
&__self_1),
Expr::Extract { field: __self_0, syntax: __self_1, expr: __self_2
} =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"Extract", "field", __self_0, "syntax", __self_1, "expr",
&__self_2),
Expr::Ceil { expr: __self_0, field: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "Ceil",
"expr", __self_0, "field", &__self_1),
Expr::Floor { expr: __self_0, field: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "Floor",
"expr", __self_0, "field", &__self_1),
Expr::Position { expr: __self_0, r#in: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Position", "expr", __self_0, "in", &__self_1),
Expr::Substring {
expr: __self_0,
substring_from: __self_1,
substring_for: __self_2,
special: __self_3,
shorthand: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"Substring", "expr", __self_0, "substring_from", __self_1,
"substring_for", __self_2, "special", __self_3, "shorthand",
&__self_4),
Expr::Trim {
expr: __self_0,
trim_where: __self_1,
trim_what: __self_2,
trim_characters: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f, "Trim",
"expr", __self_0, "trim_where", __self_1, "trim_what",
__self_2, "trim_characters", &__self_3),
Expr::Overlay {
expr: __self_0,
overlay_what: __self_1,
overlay_from: __self_2,
overlay_for: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"Overlay", "expr", __self_0, "overlay_what", __self_1,
"overlay_from", __self_2, "overlay_for", &__self_3),
Expr::Collate { expr: __self_0, collation: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Collate", "expr", __self_0, "collation", &__self_1),
Expr::Nested(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Nested",
&__self_0),
Expr::Value(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Value",
&__self_0),
Expr::Prefixed { prefix: __self_0, value: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Prefixed", "prefix", __self_0, "value", &__self_1),
Expr::TypedString(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"TypedString", &__self_0),
Expr::Function(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Function", &__self_0),
Expr::Case {
case_token: __self_0,
end_token: __self_1,
operand: __self_2,
conditions: __self_3,
else_result: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f, "Case",
"case_token", __self_0, "end_token", __self_1, "operand",
__self_2, "conditions", __self_3, "else_result", &__self_4),
Expr::Exists { subquery: __self_0, negated: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Exists", "subquery", __self_0, "negated", &__self_1),
Expr::Subquery(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Subquery", &__self_0),
Expr::GroupingSets(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"GroupingSets", &__self_0),
Expr::Cube(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Cube",
&__self_0),
Expr::Rollup(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Rollup",
&__self_0),
Expr::Tuple(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tuple",
&__self_0),
Expr::Struct { values: __self_0, fields: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Struct", "values", __self_0, "fields", &__self_1),
Expr::Named { expr: __self_0, name: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "Named",
"expr", __self_0, "name", &__self_1),
Expr::Dictionary(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Dictionary", &__self_0),
Expr::Map(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Map",
&__self_0),
Expr::Array(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Array",
&__self_0),
Expr::Interval(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Interval", &__self_0),
Expr::MatchAgainst {
columns: __self_0,
match_value: __self_1,
opt_search_modifier: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"MatchAgainst", "columns", __self_0, "match_value",
__self_1, "opt_search_modifier", &__self_2),
Expr::Wildcard(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Wildcard", &__self_0),
Expr::QualifiedWildcard(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"QualifiedWildcard", __self_0, &__self_1),
Expr::OuterJoin(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"OuterJoin", &__self_0),
Expr::Prior(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Prior",
&__self_0),
Expr::Lambda(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Lambda",
&__self_0),
Expr::MemberOf(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"MemberOf", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Expr {
#[inline]
fn clone(&self) -> Expr {
match self {
Expr::Identifier(__self_0) =>
Expr::Identifier(::core::clone::Clone::clone(__self_0)),
Expr::CompoundIdentifier(__self_0) =>
Expr::CompoundIdentifier(::core::clone::Clone::clone(__self_0)),
Expr::CompoundFieldAccess { root: __self_0, access_chain: __self_1
} =>
Expr::CompoundFieldAccess {
root: ::core::clone::Clone::clone(__self_0),
access_chain: ::core::clone::Clone::clone(__self_1),
},
Expr::JsonAccess { value: __self_0, path: __self_1 } =>
Expr::JsonAccess {
value: ::core::clone::Clone::clone(__self_0),
path: ::core::clone::Clone::clone(__self_1),
},
Expr::IsFalse(__self_0) =>
Expr::IsFalse(::core::clone::Clone::clone(__self_0)),
Expr::IsNotFalse(__self_0) =>
Expr::IsNotFalse(::core::clone::Clone::clone(__self_0)),
Expr::IsTrue(__self_0) =>
Expr::IsTrue(::core::clone::Clone::clone(__self_0)),
Expr::IsNotTrue(__self_0) =>
Expr::IsNotTrue(::core::clone::Clone::clone(__self_0)),
Expr::IsNull(__self_0) =>
Expr::IsNull(::core::clone::Clone::clone(__self_0)),
Expr::IsNotNull(__self_0) =>
Expr::IsNotNull(::core::clone::Clone::clone(__self_0)),
Expr::IsUnknown(__self_0) =>
Expr::IsUnknown(::core::clone::Clone::clone(__self_0)),
Expr::IsNotUnknown(__self_0) =>
Expr::IsNotUnknown(::core::clone::Clone::clone(__self_0)),
Expr::IsDistinctFrom(__self_0, __self_1) =>
Expr::IsDistinctFrom(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
Expr::IsNotDistinctFrom(__self_0, __self_1) =>
Expr::IsNotDistinctFrom(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
Expr::IsNormalized {
expr: __self_0, form: __self_1, negated: __self_2 } =>
Expr::IsNormalized {
expr: ::core::clone::Clone::clone(__self_0),
form: ::core::clone::Clone::clone(__self_1),
negated: ::core::clone::Clone::clone(__self_2),
},
Expr::InList { expr: __self_0, list: __self_1, negated: __self_2 }
=>
Expr::InList {
expr: ::core::clone::Clone::clone(__self_0),
list: ::core::clone::Clone::clone(__self_1),
negated: ::core::clone::Clone::clone(__self_2),
},
Expr::InSubquery {
expr: __self_0, subquery: __self_1, negated: __self_2 } =>
Expr::InSubquery {
expr: ::core::clone::Clone::clone(__self_0),
subquery: ::core::clone::Clone::clone(__self_1),
negated: ::core::clone::Clone::clone(__self_2),
},
Expr::InUnnest {
expr: __self_0, array_expr: __self_1, negated: __self_2 } =>
Expr::InUnnest {
expr: ::core::clone::Clone::clone(__self_0),
array_expr: ::core::clone::Clone::clone(__self_1),
negated: ::core::clone::Clone::clone(__self_2),
},
Expr::Between {
expr: __self_0,
negated: __self_1,
low: __self_2,
high: __self_3 } =>
Expr::Between {
expr: ::core::clone::Clone::clone(__self_0),
negated: ::core::clone::Clone::clone(__self_1),
low: ::core::clone::Clone::clone(__self_2),
high: ::core::clone::Clone::clone(__self_3),
},
Expr::BinaryOp { left: __self_0, op: __self_1, right: __self_2 }
=>
Expr::BinaryOp {
left: ::core::clone::Clone::clone(__self_0),
op: ::core::clone::Clone::clone(__self_1),
right: ::core::clone::Clone::clone(__self_2),
},
Expr::Like {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 } =>
Expr::Like {
negated: ::core::clone::Clone::clone(__self_0),
any: ::core::clone::Clone::clone(__self_1),
expr: ::core::clone::Clone::clone(__self_2),
pattern: ::core::clone::Clone::clone(__self_3),
escape_char: ::core::clone::Clone::clone(__self_4),
},
Expr::ILike {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 } =>
Expr::ILike {
negated: ::core::clone::Clone::clone(__self_0),
any: ::core::clone::Clone::clone(__self_1),
expr: ::core::clone::Clone::clone(__self_2),
pattern: ::core::clone::Clone::clone(__self_3),
escape_char: ::core::clone::Clone::clone(__self_4),
},
Expr::SimilarTo {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
escape_char: __self_3 } =>
Expr::SimilarTo {
negated: ::core::clone::Clone::clone(__self_0),
expr: ::core::clone::Clone::clone(__self_1),
pattern: ::core::clone::Clone::clone(__self_2),
escape_char: ::core::clone::Clone::clone(__self_3),
},
Expr::RLike {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
regexp: __self_3 } =>
Expr::RLike {
negated: ::core::clone::Clone::clone(__self_0),
expr: ::core::clone::Clone::clone(__self_1),
pattern: ::core::clone::Clone::clone(__self_2),
regexp: ::core::clone::Clone::clone(__self_3),
},
Expr::AnyOp {
left: __self_0,
compare_op: __self_1,
right: __self_2,
is_some: __self_3 } =>
Expr::AnyOp {
left: ::core::clone::Clone::clone(__self_0),
compare_op: ::core::clone::Clone::clone(__self_1),
right: ::core::clone::Clone::clone(__self_2),
is_some: ::core::clone::Clone::clone(__self_3),
},
Expr::AllOp {
left: __self_0, compare_op: __self_1, right: __self_2 } =>
Expr::AllOp {
left: ::core::clone::Clone::clone(__self_0),
compare_op: ::core::clone::Clone::clone(__self_1),
right: ::core::clone::Clone::clone(__self_2),
},
Expr::UnaryOp { op: __self_0, expr: __self_1 } =>
Expr::UnaryOp {
op: ::core::clone::Clone::clone(__self_0),
expr: ::core::clone::Clone::clone(__self_1),
},
Expr::Convert {
is_try: __self_0,
expr: __self_1,
data_type: __self_2,
charset: __self_3,
target_before_value: __self_4,
styles: __self_5 } =>
Expr::Convert {
is_try: ::core::clone::Clone::clone(__self_0),
expr: ::core::clone::Clone::clone(__self_1),
data_type: ::core::clone::Clone::clone(__self_2),
charset: ::core::clone::Clone::clone(__self_3),
target_before_value: ::core::clone::Clone::clone(__self_4),
styles: ::core::clone::Clone::clone(__self_5),
},
Expr::Cast {
kind: __self_0,
expr: __self_1,
data_type: __self_2,
format: __self_3 } =>
Expr::Cast {
kind: ::core::clone::Clone::clone(__self_0),
expr: ::core::clone::Clone::clone(__self_1),
data_type: ::core::clone::Clone::clone(__self_2),
format: ::core::clone::Clone::clone(__self_3),
},
Expr::AtTimeZone { timestamp: __self_0, time_zone: __self_1 } =>
Expr::AtTimeZone {
timestamp: ::core::clone::Clone::clone(__self_0),
time_zone: ::core::clone::Clone::clone(__self_1),
},
Expr::Extract { field: __self_0, syntax: __self_1, expr: __self_2
} =>
Expr::Extract {
field: ::core::clone::Clone::clone(__self_0),
syntax: ::core::clone::Clone::clone(__self_1),
expr: ::core::clone::Clone::clone(__self_2),
},
Expr::Ceil { expr: __self_0, field: __self_1 } =>
Expr::Ceil {
expr: ::core::clone::Clone::clone(__self_0),
field: ::core::clone::Clone::clone(__self_1),
},
Expr::Floor { expr: __self_0, field: __self_1 } =>
Expr::Floor {
expr: ::core::clone::Clone::clone(__self_0),
field: ::core::clone::Clone::clone(__self_1),
},
Expr::Position { expr: __self_0, r#in: __self_1 } =>
Expr::Position {
expr: ::core::clone::Clone::clone(__self_0),
r#in: ::core::clone::Clone::clone(__self_1),
},
Expr::Substring {
expr: __self_0,
substring_from: __self_1,
substring_for: __self_2,
special: __self_3,
shorthand: __self_4 } =>
Expr::Substring {
expr: ::core::clone::Clone::clone(__self_0),
substring_from: ::core::clone::Clone::clone(__self_1),
substring_for: ::core::clone::Clone::clone(__self_2),
special: ::core::clone::Clone::clone(__self_3),
shorthand: ::core::clone::Clone::clone(__self_4),
},
Expr::Trim {
expr: __self_0,
trim_where: __self_1,
trim_what: __self_2,
trim_characters: __self_3 } =>
Expr::Trim {
expr: ::core::clone::Clone::clone(__self_0),
trim_where: ::core::clone::Clone::clone(__self_1),
trim_what: ::core::clone::Clone::clone(__self_2),
trim_characters: ::core::clone::Clone::clone(__self_3),
},
Expr::Overlay {
expr: __self_0,
overlay_what: __self_1,
overlay_from: __self_2,
overlay_for: __self_3 } =>
Expr::Overlay {
expr: ::core::clone::Clone::clone(__self_0),
overlay_what: ::core::clone::Clone::clone(__self_1),
overlay_from: ::core::clone::Clone::clone(__self_2),
overlay_for: ::core::clone::Clone::clone(__self_3),
},
Expr::Collate { expr: __self_0, collation: __self_1 } =>
Expr::Collate {
expr: ::core::clone::Clone::clone(__self_0),
collation: ::core::clone::Clone::clone(__self_1),
},
Expr::Nested(__self_0) =>
Expr::Nested(::core::clone::Clone::clone(__self_0)),
Expr::Value(__self_0) =>
Expr::Value(::core::clone::Clone::clone(__self_0)),
Expr::Prefixed { prefix: __self_0, value: __self_1 } =>
Expr::Prefixed {
prefix: ::core::clone::Clone::clone(__self_0),
value: ::core::clone::Clone::clone(__self_1),
},
Expr::TypedString(__self_0) =>
Expr::TypedString(::core::clone::Clone::clone(__self_0)),
Expr::Function(__self_0) =>
Expr::Function(::core::clone::Clone::clone(__self_0)),
Expr::Case {
case_token: __self_0,
end_token: __self_1,
operand: __self_2,
conditions: __self_3,
else_result: __self_4 } =>
Expr::Case {
case_token: ::core::clone::Clone::clone(__self_0),
end_token: ::core::clone::Clone::clone(__self_1),
operand: ::core::clone::Clone::clone(__self_2),
conditions: ::core::clone::Clone::clone(__self_3),
else_result: ::core::clone::Clone::clone(__self_4),
},
Expr::Exists { subquery: __self_0, negated: __self_1 } =>
Expr::Exists {
subquery: ::core::clone::Clone::clone(__self_0),
negated: ::core::clone::Clone::clone(__self_1),
},
Expr::Subquery(__self_0) =>
Expr::Subquery(::core::clone::Clone::clone(__self_0)),
Expr::GroupingSets(__self_0) =>
Expr::GroupingSets(::core::clone::Clone::clone(__self_0)),
Expr::Cube(__self_0) =>
Expr::Cube(::core::clone::Clone::clone(__self_0)),
Expr::Rollup(__self_0) =>
Expr::Rollup(::core::clone::Clone::clone(__self_0)),
Expr::Tuple(__self_0) =>
Expr::Tuple(::core::clone::Clone::clone(__self_0)),
Expr::Struct { values: __self_0, fields: __self_1 } =>
Expr::Struct {
values: ::core::clone::Clone::clone(__self_0),
fields: ::core::clone::Clone::clone(__self_1),
},
Expr::Named { expr: __self_0, name: __self_1 } =>
Expr::Named {
expr: ::core::clone::Clone::clone(__self_0),
name: ::core::clone::Clone::clone(__self_1),
},
Expr::Dictionary(__self_0) =>
Expr::Dictionary(::core::clone::Clone::clone(__self_0)),
Expr::Map(__self_0) =>
Expr::Map(::core::clone::Clone::clone(__self_0)),
Expr::Array(__self_0) =>
Expr::Array(::core::clone::Clone::clone(__self_0)),
Expr::Interval(__self_0) =>
Expr::Interval(::core::clone::Clone::clone(__self_0)),
Expr::MatchAgainst {
columns: __self_0,
match_value: __self_1,
opt_search_modifier: __self_2 } =>
Expr::MatchAgainst {
columns: ::core::clone::Clone::clone(__self_0),
match_value: ::core::clone::Clone::clone(__self_1),
opt_search_modifier: ::core::clone::Clone::clone(__self_2),
},
Expr::Wildcard(__self_0) =>
Expr::Wildcard(::core::clone::Clone::clone(__self_0)),
Expr::QualifiedWildcard(__self_0, __self_1) =>
Expr::QualifiedWildcard(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
Expr::OuterJoin(__self_0) =>
Expr::OuterJoin(::core::clone::Clone::clone(__self_0)),
Expr::Prior(__self_0) =>
Expr::Prior(::core::clone::Clone::clone(__self_0)),
Expr::Lambda(__self_0) =>
Expr::Lambda(::core::clone::Clone::clone(__self_0)),
Expr::MemberOf(__self_0) =>
Expr::MemberOf(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Expr {
#[inline]
fn eq(&self, other: &Expr) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Expr::Identifier(__self_0), Expr::Identifier(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::CompoundIdentifier(__self_0),
Expr::CompoundIdentifier(__arg1_0)) => __self_0 == __arg1_0,
(Expr::CompoundFieldAccess {
root: __self_0, access_chain: __self_1 },
Expr::CompoundFieldAccess {
root: __arg1_0, access_chain: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::JsonAccess { value: __self_0, path: __self_1 },
Expr::JsonAccess { value: __arg1_0, path: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::IsFalse(__self_0), Expr::IsFalse(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsNotFalse(__self_0), Expr::IsNotFalse(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsTrue(__self_0), Expr::IsTrue(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsNotTrue(__self_0), Expr::IsNotTrue(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsNull(__self_0), Expr::IsNull(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsNotNull(__self_0), Expr::IsNotNull(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsUnknown(__self_0), Expr::IsUnknown(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::IsNotUnknown(__self_0), Expr::IsNotUnknown(__arg1_0))
=> __self_0 == __arg1_0,
(Expr::IsDistinctFrom(__self_0, __self_1),
Expr::IsDistinctFrom(__arg1_0, __arg1_1)) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::IsNotDistinctFrom(__self_0, __self_1),
Expr::IsNotDistinctFrom(__arg1_0, __arg1_1)) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::IsNormalized {
expr: __self_0, form: __self_1, negated: __self_2 },
Expr::IsNormalized {
expr: __arg1_0, form: __arg1_1, negated: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
(Expr::InList {
expr: __self_0, list: __self_1, negated: __self_2 },
Expr::InList {
expr: __arg1_0, list: __arg1_1, negated: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
(Expr::InSubquery {
expr: __self_0, subquery: __self_1, negated: __self_2 },
Expr::InSubquery {
expr: __arg1_0, subquery: __arg1_1, negated: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
(Expr::InUnnest {
expr: __self_0, array_expr: __self_1, negated: __self_2 },
Expr::InUnnest {
expr: __arg1_0, array_expr: __arg1_1, negated: __arg1_2 })
=>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
(Expr::Between {
expr: __self_0,
negated: __self_1,
low: __self_2,
high: __self_3 }, Expr::Between {
expr: __arg1_0,
negated: __arg1_1,
low: __arg1_2,
high: __arg1_3 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Expr::BinaryOp {
left: __self_0, op: __self_1, right: __self_2 },
Expr::BinaryOp {
left: __arg1_0, op: __arg1_1, right: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Expr::Like {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 }, Expr::Like {
negated: __arg1_0,
any: __arg1_1,
expr: __arg1_2,
pattern: __arg1_3,
escape_char: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Expr::ILike {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 }, Expr::ILike {
negated: __arg1_0,
any: __arg1_1,
expr: __arg1_2,
pattern: __arg1_3,
escape_char: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Expr::SimilarTo {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
escape_char: __self_3 }, Expr::SimilarTo {
negated: __arg1_0,
expr: __arg1_1,
pattern: __arg1_2,
escape_char: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Expr::RLike {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
regexp: __self_3 }, Expr::RLike {
negated: __arg1_0,
expr: __arg1_1,
pattern: __arg1_2,
regexp: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_3 == __arg1_3 &&
__self_1 == __arg1_1 && __self_2 == __arg1_2,
(Expr::AnyOp {
left: __self_0,
compare_op: __self_1,
right: __self_2,
is_some: __self_3 }, Expr::AnyOp {
left: __arg1_0,
compare_op: __arg1_1,
right: __arg1_2,
is_some: __arg1_3 }) =>
__self_3 == __arg1_3 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_2 == __arg1_2,
(Expr::AllOp {
left: __self_0, compare_op: __self_1, right: __self_2 },
Expr::AllOp {
left: __arg1_0, compare_op: __arg1_1, right: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Expr::UnaryOp { op: __self_0, expr: __self_1 },
Expr::UnaryOp { op: __arg1_0, expr: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Convert {
is_try: __self_0,
expr: __self_1,
data_type: __self_2,
charset: __self_3,
target_before_value: __self_4,
styles: __self_5 }, Expr::Convert {
is_try: __arg1_0,
expr: __arg1_1,
data_type: __arg1_2,
charset: __arg1_3,
target_before_value: __arg1_4,
styles: __arg1_5 }) =>
__self_0 == __arg1_0 && __self_4 == __arg1_4 &&
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_3 == __arg1_3 && __self_5 == __arg1_5,
(Expr::Cast {
kind: __self_0,
expr: __self_1,
data_type: __self_2,
format: __self_3 }, Expr::Cast {
kind: __arg1_0,
expr: __arg1_1,
data_type: __arg1_2,
format: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Expr::AtTimeZone { timestamp: __self_0, time_zone: __self_1
}, Expr::AtTimeZone {
timestamp: __arg1_0, time_zone: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Extract {
field: __self_0, syntax: __self_1, expr: __self_2 },
Expr::Extract {
field: __arg1_0, syntax: __arg1_1, expr: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Expr::Ceil { expr: __self_0, field: __self_1 }, Expr::Ceil {
expr: __arg1_0, field: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Floor { expr: __self_0, field: __self_1 },
Expr::Floor { expr: __arg1_0, field: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Position { expr: __self_0, r#in: __self_1 },
Expr::Position { expr: __arg1_0, r#in: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Substring {
expr: __self_0,
substring_from: __self_1,
substring_for: __self_2,
special: __self_3,
shorthand: __self_4 }, Expr::Substring {
expr: __arg1_0,
substring_from: __arg1_1,
substring_for: __arg1_2,
special: __arg1_3,
shorthand: __arg1_4 }) =>
__self_3 == __arg1_3 && __self_4 == __arg1_4 &&
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Expr::Trim {
expr: __self_0,
trim_where: __self_1,
trim_what: __self_2,
trim_characters: __self_3 }, Expr::Trim {
expr: __arg1_0,
trim_where: __arg1_1,
trim_what: __arg1_2,
trim_characters: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Expr::Overlay {
expr: __self_0,
overlay_what: __self_1,
overlay_from: __self_2,
overlay_for: __self_3 }, Expr::Overlay {
expr: __arg1_0,
overlay_what: __arg1_1,
overlay_from: __arg1_2,
overlay_for: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Expr::Collate { expr: __self_0, collation: __self_1 },
Expr::Collate { expr: __arg1_0, collation: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Nested(__self_0), Expr::Nested(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Value(__self_0), Expr::Value(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Prefixed { prefix: __self_0, value: __self_1 },
Expr::Prefixed { prefix: __arg1_0, value: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::TypedString(__self_0), Expr::TypedString(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Function(__self_0), Expr::Function(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Case {
case_token: __self_0,
end_token: __self_1,
operand: __self_2,
conditions: __self_3,
else_result: __self_4 }, Expr::Case {
case_token: __arg1_0,
end_token: __arg1_1,
operand: __arg1_2,
conditions: __arg1_3,
else_result: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Expr::Exists { subquery: __self_0, negated: __self_1 },
Expr::Exists { subquery: __arg1_0, negated: __arg1_1 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
(Expr::Subquery(__self_0), Expr::Subquery(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::GroupingSets(__self_0), Expr::GroupingSets(__arg1_0))
=> __self_0 == __arg1_0,
(Expr::Cube(__self_0), Expr::Cube(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Rollup(__self_0), Expr::Rollup(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Tuple(__self_0), Expr::Tuple(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Struct { values: __self_0, fields: __self_1 },
Expr::Struct { values: __arg1_0, fields: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Named { expr: __self_0, name: __self_1 }, Expr::Named {
expr: __arg1_0, name: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::Dictionary(__self_0), Expr::Dictionary(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Map(__self_0), Expr::Map(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Array(__self_0), Expr::Array(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Interval(__self_0), Expr::Interval(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::MatchAgainst {
columns: __self_0,
match_value: __self_1,
opt_search_modifier: __self_2 }, Expr::MatchAgainst {
columns: __arg1_0,
match_value: __arg1_1,
opt_search_modifier: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Expr::Wildcard(__self_0), Expr::Wildcard(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::QualifiedWildcard(__self_0, __self_1),
Expr::QualifiedWildcard(__arg1_0, __arg1_1)) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Expr::OuterJoin(__self_0), Expr::OuterJoin(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Prior(__self_0), Expr::Prior(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::Lambda(__self_0), Expr::Lambda(__arg1_0)) =>
__self_0 == __arg1_0,
(Expr::MemberOf(__self_0), Expr::MemberOf(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Expr {
#[inline]
fn partial_cmp(&self, other: &Expr)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(Expr::Identifier(__self_0), Expr::Identifier(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::CompoundIdentifier(__self_0),
Expr::CompoundIdentifier(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::CompoundFieldAccess {
root: __self_0, access_chain: __self_1 },
Expr::CompoundFieldAccess {
root: __arg1_0, access_chain: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::JsonAccess { value: __self_0, path: __self_1 },
Expr::JsonAccess { value: __arg1_0, path: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::IsFalse(__self_0), Expr::IsFalse(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsNotFalse(__self_0), Expr::IsNotFalse(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsTrue(__self_0), Expr::IsTrue(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsNotTrue(__self_0), Expr::IsNotTrue(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsNull(__self_0), Expr::IsNull(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsNotNull(__self_0), Expr::IsNotNull(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsUnknown(__self_0), Expr::IsUnknown(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsNotUnknown(__self_0), Expr::IsNotUnknown(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::IsDistinctFrom(__self_0, __self_1),
Expr::IsDistinctFrom(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::IsNotDistinctFrom(__self_0, __self_1),
Expr::IsNotDistinctFrom(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::IsNormalized {
expr: __self_0, form: __self_1, negated: __self_2 },
Expr::IsNormalized {
expr: __arg1_0, form: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::InList { expr: __self_0, list: __self_1, negated: __self_2
}, Expr::InList {
expr: __arg1_0, list: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::InSubquery {
expr: __self_0, subquery: __self_1, negated: __self_2 },
Expr::InSubquery {
expr: __arg1_0, subquery: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::InUnnest {
expr: __self_0, array_expr: __self_1, negated: __self_2 },
Expr::InUnnest {
expr: __arg1_0, array_expr: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Between {
expr: __self_0,
negated: __self_1,
low: __self_2,
high: __self_3 }, Expr::Between {
expr: __arg1_0,
negated: __arg1_1,
low: __arg1_2,
high: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::BinaryOp { left: __self_0, op: __self_1, right: __self_2 },
Expr::BinaryOp { left: __arg1_0, op: __arg1_1, right: __arg1_2
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Like {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 }, Expr::Like {
negated: __arg1_0,
any: __arg1_1,
expr: __arg1_2,
pattern: __arg1_3,
escape_char: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::ILike {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 }, Expr::ILike {
negated: __arg1_0,
any: __arg1_1,
expr: __arg1_2,
pattern: __arg1_3,
escape_char: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::SimilarTo {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
escape_char: __self_3 }, Expr::SimilarTo {
negated: __arg1_0,
expr: __arg1_1,
pattern: __arg1_2,
escape_char: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::RLike {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
regexp: __self_3 }, Expr::RLike {
negated: __arg1_0,
expr: __arg1_1,
pattern: __arg1_2,
regexp: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::AnyOp {
left: __self_0,
compare_op: __self_1,
right: __self_2,
is_some: __self_3 }, Expr::AnyOp {
left: __arg1_0,
compare_op: __arg1_1,
right: __arg1_2,
is_some: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::AllOp {
left: __self_0, compare_op: __self_1, right: __self_2 },
Expr::AllOp {
left: __arg1_0, compare_op: __arg1_1, right: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::UnaryOp { op: __self_0, expr: __self_1 }, Expr::UnaryOp {
op: __arg1_0, expr: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Convert {
is_try: __self_0,
expr: __self_1,
data_type: __self_2,
charset: __self_3,
target_before_value: __self_4,
styles: __self_5 }, Expr::Convert {
is_try: __arg1_0,
expr: __arg1_1,
data_type: __arg1_2,
charset: __arg1_3,
target_before_value: __arg1_4,
styles: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Cast {
kind: __self_0,
expr: __self_1,
data_type: __self_2,
format: __self_3 }, Expr::Cast {
kind: __arg1_0,
expr: __arg1_1,
data_type: __arg1_2,
format: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::AtTimeZone { timestamp: __self_0, time_zone: __self_1 },
Expr::AtTimeZone { timestamp: __arg1_0, time_zone: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Extract { field: __self_0, syntax: __self_1, expr: __self_2
}, Expr::Extract {
field: __arg1_0, syntax: __arg1_1, expr: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Ceil { expr: __self_0, field: __self_1 }, Expr::Ceil {
expr: __arg1_0, field: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Floor { expr: __self_0, field: __self_1 }, Expr::Floor {
expr: __arg1_0, field: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Position { expr: __self_0, r#in: __self_1 },
Expr::Position { expr: __arg1_0, r#in: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Substring {
expr: __self_0,
substring_from: __self_1,
substring_for: __self_2,
special: __self_3,
shorthand: __self_4 }, Expr::Substring {
expr: __arg1_0,
substring_from: __arg1_1,
substring_for: __arg1_2,
special: __arg1_3,
shorthand: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Trim {
expr: __self_0,
trim_where: __self_1,
trim_what: __self_2,
trim_characters: __self_3 }, Expr::Trim {
expr: __arg1_0,
trim_where: __arg1_1,
trim_what: __arg1_2,
trim_characters: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Overlay {
expr: __self_0,
overlay_what: __self_1,
overlay_from: __self_2,
overlay_for: __self_3 }, Expr::Overlay {
expr: __arg1_0,
overlay_what: __arg1_1,
overlay_from: __arg1_2,
overlay_for: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Collate { expr: __self_0, collation: __self_1 },
Expr::Collate { expr: __arg1_0, collation: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Nested(__self_0), Expr::Nested(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Value(__self_0), Expr::Value(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Prefixed { prefix: __self_0, value: __self_1 },
Expr::Prefixed { prefix: __arg1_0, value: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::TypedString(__self_0), Expr::TypedString(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Function(__self_0), Expr::Function(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Case {
case_token: __self_0,
end_token: __self_1,
operand: __self_2,
conditions: __self_3,
else_result: __self_4 }, Expr::Case {
case_token: __arg1_0,
end_token: __arg1_1,
operand: __arg1_2,
conditions: __arg1_3,
else_result: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Exists { subquery: __self_0, negated: __self_1 },
Expr::Exists { subquery: __arg1_0, negated: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Subquery(__self_0), Expr::Subquery(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::GroupingSets(__self_0), Expr::GroupingSets(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Cube(__self_0), Expr::Cube(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Rollup(__self_0), Expr::Rollup(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Tuple(__self_0), Expr::Tuple(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Struct { values: __self_0, fields: __self_1 },
Expr::Struct { values: __arg1_0, fields: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Named { expr: __self_0, name: __self_1 }, Expr::Named {
expr: __arg1_0, name: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Dictionary(__self_0), Expr::Dictionary(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Map(__self_0), Expr::Map(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Array(__self_0), Expr::Array(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Interval(__self_0), Expr::Interval(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::MatchAgainst {
columns: __self_0,
match_value: __self_1,
opt_search_modifier: __self_2 }, Expr::MatchAgainst {
columns: __arg1_0,
match_value: __arg1_1,
opt_search_modifier: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Wildcard(__self_0), Expr::Wildcard(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::QualifiedWildcard(__self_0, __self_1),
Expr::QualifiedWildcard(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::OuterJoin(__self_0), Expr::OuterJoin(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Prior(__self_0), Expr::Prior(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::Lambda(__self_0), Expr::Lambda(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Expr::MemberOf(__self_0), Expr::MemberOf(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Expr {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<AccessExpr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<JsonPath>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<NormalizationForm>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<BinaryOperator>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<UnaryOperator>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<CastKind>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<DataType>;
let _: ::core::cmp::AssertParamIsEq<Option<CastFormat>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<DateTimeField>;
let _: ::core::cmp::AssertParamIsEq<ExtractSyntax>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<CeilFloorKind>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<TrimWhereField>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<ValueWithSpan>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<TypedString>;
let _: ::core::cmp::AssertParamIsEq<Function>;
let _: ::core::cmp::AssertParamIsEq<AttachedToken>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Vec<CaseWhen>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<StructField>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<DictionaryField>>;
let _: ::core::cmp::AssertParamIsEq<Map>;
let _: ::core::cmp::AssertParamIsEq<Array>;
let _: ::core::cmp::AssertParamIsEq<Interval>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Value>;
let _: ::core::cmp::AssertParamIsEq<Option<SearchModifier>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<LambdaFunction>;
let _: ::core::cmp::AssertParamIsEq<MemberOf>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Expr {
#[inline]
fn cmp(&self, other: &Expr) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Expr::Identifier(__self_0), Expr::Identifier(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::CompoundIdentifier(__self_0),
Expr::CompoundIdentifier(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::CompoundFieldAccess {
root: __self_0, access_chain: __self_1 },
Expr::CompoundFieldAccess {
root: __arg1_0, access_chain: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::JsonAccess { value: __self_0, path: __self_1 },
Expr::JsonAccess { value: __arg1_0, path: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::IsFalse(__self_0), Expr::IsFalse(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsNotFalse(__self_0), Expr::IsNotFalse(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsTrue(__self_0), Expr::IsTrue(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsNotTrue(__self_0), Expr::IsNotTrue(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsNull(__self_0), Expr::IsNull(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsNotNull(__self_0), Expr::IsNotNull(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsUnknown(__self_0), Expr::IsUnknown(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsNotUnknown(__self_0), Expr::IsNotUnknown(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::IsDistinctFrom(__self_0, __self_1),
Expr::IsDistinctFrom(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::IsNotDistinctFrom(__self_0, __self_1),
Expr::IsNotDistinctFrom(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::IsNormalized {
expr: __self_0, form: __self_1, negated: __self_2 },
Expr::IsNormalized {
expr: __arg1_0, form: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::InList {
expr: __self_0, list: __self_1, negated: __self_2 },
Expr::InList {
expr: __arg1_0, list: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::InSubquery {
expr: __self_0, subquery: __self_1, negated: __self_2 },
Expr::InSubquery {
expr: __arg1_0, subquery: __arg1_1, negated: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::InUnnest {
expr: __self_0, array_expr: __self_1, negated: __self_2 },
Expr::InUnnest {
expr: __arg1_0, array_expr: __arg1_1, negated: __arg1_2 })
=>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Between {
expr: __self_0,
negated: __self_1,
low: __self_2,
high: __self_3 }, Expr::Between {
expr: __arg1_0,
negated: __arg1_1,
low: __arg1_2,
high: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::BinaryOp {
left: __self_0, op: __self_1, right: __self_2 },
Expr::BinaryOp {
left: __arg1_0, op: __arg1_1, right: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Like {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 }, Expr::Like {
negated: __arg1_0,
any: __arg1_1,
expr: __arg1_2,
pattern: __arg1_3,
escape_char: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::ILike {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 }, Expr::ILike {
negated: __arg1_0,
any: __arg1_1,
expr: __arg1_2,
pattern: __arg1_3,
escape_char: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::SimilarTo {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
escape_char: __self_3 }, Expr::SimilarTo {
negated: __arg1_0,
expr: __arg1_1,
pattern: __arg1_2,
escape_char: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::RLike {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
regexp: __self_3 }, Expr::RLike {
negated: __arg1_0,
expr: __arg1_1,
pattern: __arg1_2,
regexp: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::AnyOp {
left: __self_0,
compare_op: __self_1,
right: __self_2,
is_some: __self_3 }, Expr::AnyOp {
left: __arg1_0,
compare_op: __arg1_1,
right: __arg1_2,
is_some: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::AllOp {
left: __self_0, compare_op: __self_1, right: __self_2 },
Expr::AllOp {
left: __arg1_0, compare_op: __arg1_1, right: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::UnaryOp { op: __self_0, expr: __self_1 },
Expr::UnaryOp { op: __arg1_0, expr: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Convert {
is_try: __self_0,
expr: __self_1,
data_type: __self_2,
charset: __self_3,
target_before_value: __self_4,
styles: __self_5 }, Expr::Convert {
is_try: __arg1_0,
expr: __arg1_1,
data_type: __arg1_2,
charset: __arg1_3,
target_before_value: __arg1_4,
styles: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Cast {
kind: __self_0,
expr: __self_1,
data_type: __self_2,
format: __self_3 }, Expr::Cast {
kind: __arg1_0,
expr: __arg1_1,
data_type: __arg1_2,
format: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::AtTimeZone { timestamp: __self_0, time_zone: __self_1
}, Expr::AtTimeZone {
timestamp: __arg1_0, time_zone: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Extract {
field: __self_0, syntax: __self_1, expr: __self_2 },
Expr::Extract {
field: __arg1_0, syntax: __arg1_1, expr: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Ceil { expr: __self_0, field: __self_1 },
Expr::Ceil { expr: __arg1_0, field: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Floor { expr: __self_0, field: __self_1 },
Expr::Floor { expr: __arg1_0, field: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Position { expr: __self_0, r#in: __self_1 },
Expr::Position { expr: __arg1_0, r#in: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Substring {
expr: __self_0,
substring_from: __self_1,
substring_for: __self_2,
special: __self_3,
shorthand: __self_4 }, Expr::Substring {
expr: __arg1_0,
substring_from: __arg1_1,
substring_for: __arg1_2,
special: __arg1_3,
shorthand: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Trim {
expr: __self_0,
trim_where: __self_1,
trim_what: __self_2,
trim_characters: __self_3 }, Expr::Trim {
expr: __arg1_0,
trim_where: __arg1_1,
trim_what: __arg1_2,
trim_characters: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Overlay {
expr: __self_0,
overlay_what: __self_1,
overlay_from: __self_2,
overlay_for: __self_3 }, Expr::Overlay {
expr: __arg1_0,
overlay_what: __arg1_1,
overlay_from: __arg1_2,
overlay_for: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Collate { expr: __self_0, collation: __self_1 },
Expr::Collate { expr: __arg1_0, collation: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Nested(__self_0), Expr::Nested(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Value(__self_0), Expr::Value(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Prefixed { prefix: __self_0, value: __self_1 },
Expr::Prefixed { prefix: __arg1_0, value: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::TypedString(__self_0), Expr::TypedString(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Function(__self_0), Expr::Function(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Case {
case_token: __self_0,
end_token: __self_1,
operand: __self_2,
conditions: __self_3,
else_result: __self_4 }, Expr::Case {
case_token: __arg1_0,
end_token: __arg1_1,
operand: __arg1_2,
conditions: __arg1_3,
else_result: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Expr::Exists { subquery: __self_0, negated: __self_1 },
Expr::Exists { subquery: __arg1_0, negated: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Subquery(__self_0), Expr::Subquery(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::GroupingSets(__self_0), Expr::GroupingSets(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Cube(__self_0), Expr::Cube(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Rollup(__self_0), Expr::Rollup(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Tuple(__self_0), Expr::Tuple(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Struct { values: __self_0, fields: __self_1 },
Expr::Struct { values: __arg1_0, fields: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Named { expr: __self_0, name: __self_1 },
Expr::Named { expr: __arg1_0, name: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::Dictionary(__self_0), Expr::Dictionary(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Map(__self_0), Expr::Map(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Array(__self_0), Expr::Array(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Interval(__self_0), Expr::Interval(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::MatchAgainst {
columns: __self_0,
match_value: __self_1,
opt_search_modifier: __self_2 }, Expr::MatchAgainst {
columns: __arg1_0,
match_value: __arg1_1,
opt_search_modifier: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Expr::Wildcard(__self_0), Expr::Wildcard(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::QualifiedWildcard(__self_0, __self_1),
Expr::QualifiedWildcard(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Expr::OuterJoin(__self_0), Expr::OuterJoin(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Prior(__self_0), Expr::Prior(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::Lambda(__self_0), Expr::Lambda(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Expr::MemberOf(__self_0), Expr::MemberOf(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Expr {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Expr::Identifier(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::CompoundIdentifier(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::CompoundFieldAccess { root: __self_0, access_chain: __self_1
} => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::JsonAccess { value: __self_0, path: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::IsFalse(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsNotFalse(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsTrue(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsNotTrue(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsNull(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsNotNull(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsUnknown(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsNotUnknown(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::IsDistinctFrom(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::IsNotDistinctFrom(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::IsNormalized {
expr: __self_0, form: __self_1, negated: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::InList { expr: __self_0, list: __self_1, negated: __self_2 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::InSubquery {
expr: __self_0, subquery: __self_1, negated: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::InUnnest {
expr: __self_0, array_expr: __self_1, negated: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::Between {
expr: __self_0,
negated: __self_1,
low: __self_2,
high: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::BinaryOp { left: __self_0, op: __self_1, right: __self_2 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::Like {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Expr::ILike {
negated: __self_0,
any: __self_1,
expr: __self_2,
pattern: __self_3,
escape_char: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Expr::SimilarTo {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
escape_char: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::RLike {
negated: __self_0,
expr: __self_1,
pattern: __self_2,
regexp: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::AnyOp {
left: __self_0,
compare_op: __self_1,
right: __self_2,
is_some: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::AllOp {
left: __self_0, compare_op: __self_1, right: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::UnaryOp { op: __self_0, expr: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Convert {
is_try: __self_0,
expr: __self_1,
data_type: __self_2,
charset: __self_3,
target_before_value: __self_4,
styles: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Expr::Cast {
kind: __self_0,
expr: __self_1,
data_type: __self_2,
format: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::AtTimeZone { timestamp: __self_0, time_zone: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Extract { field: __self_0, syntax: __self_1, expr: __self_2
} => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::Ceil { expr: __self_0, field: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Floor { expr: __self_0, field: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Position { expr: __self_0, r#in: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Substring {
expr: __self_0,
substring_from: __self_1,
substring_for: __self_2,
special: __self_3,
shorthand: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Expr::Trim {
expr: __self_0,
trim_where: __self_1,
trim_what: __self_2,
trim_characters: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::Overlay {
expr: __self_0,
overlay_what: __self_1,
overlay_from: __self_2,
overlay_for: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Expr::Collate { expr: __self_0, collation: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Nested(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Value(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Prefixed { prefix: __self_0, value: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::TypedString(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Function(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Case {
case_token: __self_0,
end_token: __self_1,
operand: __self_2,
conditions: __self_3,
else_result: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Expr::Exists { subquery: __self_0, negated: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Subquery(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::GroupingSets(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Cube(__self_0) => ::core::hash::Hash::hash(__self_0, state),
Expr::Rollup(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Tuple(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Struct { values: __self_0, fields: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Named { expr: __self_0, name: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::Dictionary(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Map(__self_0) => ::core::hash::Hash::hash(__self_0, state),
Expr::Array(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Interval(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::MatchAgainst {
columns: __self_0,
match_value: __self_1,
opt_search_modifier: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Expr::Wildcard(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::QualifiedWildcard(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Expr::OuterJoin(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Prior(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::Lambda(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Expr::MemberOf(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
728#[cfg_attr(
729 feature = "visitor",
730 derive(impl sqlparser::ast::Visit for Expr {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
visitor.pre_visit_expr(self)?;
match self {
Self::Identifier(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CompoundIdentifier(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CompoundFieldAccess { root, access_chain } => {
sqlparser::ast::Visit::visit(root, visitor)?;
sqlparser::ast::Visit::visit(access_chain, visitor)?;
}
Self::JsonAccess { value, path } => {
sqlparser::ast::Visit::visit(value, visitor)?;
sqlparser::ast::Visit::visit(path, visitor)?;
}
Self::IsFalse(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsNotFalse(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsTrue(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsNotTrue(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsNull(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsNotNull(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsUnknown(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsNotUnknown(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsDistinctFrom(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
Self::IsNotDistinctFrom(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
Self::IsNormalized { expr, form, negated } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(form, visitor)?;
sqlparser::ast::Visit::visit(negated, visitor)?;
}
Self::InList { expr, list, negated } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(list, visitor)?;
sqlparser::ast::Visit::visit(negated, visitor)?;
}
Self::InSubquery { expr, subquery, negated } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(subquery, visitor)?;
sqlparser::ast::Visit::visit(negated, visitor)?;
}
Self::InUnnest { expr, array_expr, negated } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(array_expr, visitor)?;
sqlparser::ast::Visit::visit(negated, visitor)?;
}
Self::Between { expr, negated, low, high } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(negated, visitor)?;
sqlparser::ast::Visit::visit(low, visitor)?;
sqlparser::ast::Visit::visit(high, visitor)?;
}
Self::BinaryOp { left, op, right } => {
sqlparser::ast::Visit::visit(left, visitor)?;
sqlparser::ast::Visit::visit(op, visitor)?;
sqlparser::ast::Visit::visit(right, visitor)?;
}
Self::Like { negated, any, expr, pattern, escape_char } => {
sqlparser::ast::Visit::visit(negated, visitor)?;
sqlparser::ast::Visit::visit(any, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(pattern, visitor)?;
sqlparser::ast::Visit::visit(escape_char, visitor)?;
}
Self::ILike { negated, any, expr, pattern, escape_char } => {
sqlparser::ast::Visit::visit(negated, visitor)?;
sqlparser::ast::Visit::visit(any, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(pattern, visitor)?;
sqlparser::ast::Visit::visit(escape_char, visitor)?;
}
Self::SimilarTo { negated, expr, pattern, escape_char } => {
sqlparser::ast::Visit::visit(negated, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(pattern, visitor)?;
sqlparser::ast::Visit::visit(escape_char, visitor)?;
}
Self::RLike { negated, expr, pattern, regexp } => {
sqlparser::ast::Visit::visit(negated, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(pattern, visitor)?;
sqlparser::ast::Visit::visit(regexp, visitor)?;
}
Self::AnyOp { left, compare_op, right, is_some } => {
sqlparser::ast::Visit::visit(left, visitor)?;
sqlparser::ast::Visit::visit(compare_op, visitor)?;
sqlparser::ast::Visit::visit(right, visitor)?;
sqlparser::ast::Visit::visit(is_some, visitor)?;
}
Self::AllOp { left, compare_op, right } => {
sqlparser::ast::Visit::visit(left, visitor)?;
sqlparser::ast::Visit::visit(compare_op, visitor)?;
sqlparser::ast::Visit::visit(right, visitor)?;
}
Self::UnaryOp { op, expr } => {
sqlparser::ast::Visit::visit(op, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
}
Self::Convert {
is_try, expr, data_type, charset, target_before_value, styles
} => {
sqlparser::ast::Visit::visit(is_try, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(data_type, visitor)?;
sqlparser::ast::Visit::visit(charset, visitor)?;
sqlparser::ast::Visit::visit(target_before_value, visitor)?;
sqlparser::ast::Visit::visit(styles, visitor)?;
}
Self::Cast { kind, expr, data_type, format } => {
sqlparser::ast::Visit::visit(kind, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(data_type, visitor)?;
sqlparser::ast::Visit::visit(format, visitor)?;
}
Self::AtTimeZone { timestamp, time_zone } => {
sqlparser::ast::Visit::visit(timestamp, visitor)?;
sqlparser::ast::Visit::visit(time_zone, visitor)?;
}
Self::Extract { field, syntax, expr } => {
sqlparser::ast::Visit::visit(field, visitor)?;
sqlparser::ast::Visit::visit(syntax, visitor)?;
sqlparser::ast::Visit::visit(expr, visitor)?;
}
Self::Ceil { expr, field } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(field, visitor)?;
}
Self::Floor { expr, field } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(field, visitor)?;
}
Self::Position { expr, r#in } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(r#in, visitor)?;
}
Self::Substring {
expr, substring_from, substring_for, special, shorthand } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(substring_from, visitor)?;
sqlparser::ast::Visit::visit(substring_for, visitor)?;
sqlparser::ast::Visit::visit(special, visitor)?;
sqlparser::ast::Visit::visit(shorthand, visitor)?;
}
Self::Trim { expr, trim_where, trim_what, trim_characters } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(trim_where, visitor)?;
sqlparser::ast::Visit::visit(trim_what, visitor)?;
sqlparser::ast::Visit::visit(trim_characters, visitor)?;
}
Self::Overlay { expr, overlay_what, overlay_from, overlay_for } =>
{
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(overlay_what, visitor)?;
sqlparser::ast::Visit::visit(overlay_from, visitor)?;
sqlparser::ast::Visit::visit(overlay_for, visitor)?;
}
Self::Collate { expr, collation } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(collation, visitor)?;
}
Self::Nested(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Value(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Prefixed { prefix, value } => {
sqlparser::ast::Visit::visit(prefix, visitor)?;
sqlparser::ast::Visit::visit(value, visitor)?;
}
Self::TypedString(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Function(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Case {
case_token, end_token, operand, conditions, else_result } => {
sqlparser::ast::Visit::visit(case_token, visitor)?;
sqlparser::ast::Visit::visit(end_token, visitor)?;
sqlparser::ast::Visit::visit(operand, visitor)?;
sqlparser::ast::Visit::visit(conditions, visitor)?;
sqlparser::ast::Visit::visit(else_result, visitor)?;
}
Self::Exists { subquery, negated } => {
sqlparser::ast::Visit::visit(subquery, visitor)?;
sqlparser::ast::Visit::visit(negated, visitor)?;
}
Self::Subquery(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::GroupingSets(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Cube(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Rollup(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Tuple(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Struct { values, fields } => {
sqlparser::ast::Visit::visit(values, visitor)?;
sqlparser::ast::Visit::visit(fields, visitor)?;
}
Self::Named { expr, name } => {
sqlparser::ast::Visit::visit(expr, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
}
Self::Dictionary(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Map(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Array(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Interval(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::MatchAgainst { columns, match_value, opt_search_modifier }
=> {
sqlparser::ast::Visit::visit(columns, visitor)?;
sqlparser::ast::Visit::visit(match_value, visitor)?;
sqlparser::ast::Visit::visit(opt_search_modifier, visitor)?;
}
Self::Wildcard(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::QualifiedWildcard(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
Self::OuterJoin(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Prior(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Lambda(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::MemberOf(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
visitor.post_visit_expr(self)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Expr {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
visitor.pre_visit_expr(self)?;
match self {
Self::Identifier(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CompoundIdentifier(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CompoundFieldAccess { root, access_chain } => {
sqlparser::ast::VisitMut::visit(root, visitor)?;
sqlparser::ast::VisitMut::visit(access_chain, visitor)?;
}
Self::JsonAccess { value, path } => {
sqlparser::ast::VisitMut::visit(value, visitor)?;
sqlparser::ast::VisitMut::visit(path, visitor)?;
}
Self::IsFalse(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsNotFalse(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsTrue(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsNotTrue(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsNull(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsNotNull(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsUnknown(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsNotUnknown(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsDistinctFrom(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
Self::IsNotDistinctFrom(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
Self::IsNormalized { expr, form, negated } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(form, visitor)?;
sqlparser::ast::VisitMut::visit(negated, visitor)?;
}
Self::InList { expr, list, negated } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(list, visitor)?;
sqlparser::ast::VisitMut::visit(negated, visitor)?;
}
Self::InSubquery { expr, subquery, negated } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(subquery, visitor)?;
sqlparser::ast::VisitMut::visit(negated, visitor)?;
}
Self::InUnnest { expr, array_expr, negated } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(array_expr, visitor)?;
sqlparser::ast::VisitMut::visit(negated, visitor)?;
}
Self::Between { expr, negated, low, high } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(negated, visitor)?;
sqlparser::ast::VisitMut::visit(low, visitor)?;
sqlparser::ast::VisitMut::visit(high, visitor)?;
}
Self::BinaryOp { left, op, right } => {
sqlparser::ast::VisitMut::visit(left, visitor)?;
sqlparser::ast::VisitMut::visit(op, visitor)?;
sqlparser::ast::VisitMut::visit(right, visitor)?;
}
Self::Like { negated, any, expr, pattern, escape_char } => {
sqlparser::ast::VisitMut::visit(negated, visitor)?;
sqlparser::ast::VisitMut::visit(any, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(pattern, visitor)?;
sqlparser::ast::VisitMut::visit(escape_char, visitor)?;
}
Self::ILike { negated, any, expr, pattern, escape_char } => {
sqlparser::ast::VisitMut::visit(negated, visitor)?;
sqlparser::ast::VisitMut::visit(any, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(pattern, visitor)?;
sqlparser::ast::VisitMut::visit(escape_char, visitor)?;
}
Self::SimilarTo { negated, expr, pattern, escape_char } => {
sqlparser::ast::VisitMut::visit(negated, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(pattern, visitor)?;
sqlparser::ast::VisitMut::visit(escape_char, visitor)?;
}
Self::RLike { negated, expr, pattern, regexp } => {
sqlparser::ast::VisitMut::visit(negated, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(pattern, visitor)?;
sqlparser::ast::VisitMut::visit(regexp, visitor)?;
}
Self::AnyOp { left, compare_op, right, is_some } => {
sqlparser::ast::VisitMut::visit(left, visitor)?;
sqlparser::ast::VisitMut::visit(compare_op, visitor)?;
sqlparser::ast::VisitMut::visit(right, visitor)?;
sqlparser::ast::VisitMut::visit(is_some, visitor)?;
}
Self::AllOp { left, compare_op, right } => {
sqlparser::ast::VisitMut::visit(left, visitor)?;
sqlparser::ast::VisitMut::visit(compare_op, visitor)?;
sqlparser::ast::VisitMut::visit(right, visitor)?;
}
Self::UnaryOp { op, expr } => {
sqlparser::ast::VisitMut::visit(op, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
}
Self::Convert {
is_try, expr, data_type, charset, target_before_value, styles
} => {
sqlparser::ast::VisitMut::visit(is_try, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(data_type, visitor)?;
sqlparser::ast::VisitMut::visit(charset, visitor)?;
sqlparser::ast::VisitMut::visit(target_before_value,
visitor)?;
sqlparser::ast::VisitMut::visit(styles, visitor)?;
}
Self::Cast { kind, expr, data_type, format } => {
sqlparser::ast::VisitMut::visit(kind, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(data_type, visitor)?;
sqlparser::ast::VisitMut::visit(format, visitor)?;
}
Self::AtTimeZone { timestamp, time_zone } => {
sqlparser::ast::VisitMut::visit(timestamp, visitor)?;
sqlparser::ast::VisitMut::visit(time_zone, visitor)?;
}
Self::Extract { field, syntax, expr } => {
sqlparser::ast::VisitMut::visit(field, visitor)?;
sqlparser::ast::VisitMut::visit(syntax, visitor)?;
sqlparser::ast::VisitMut::visit(expr, visitor)?;
}
Self::Ceil { expr, field } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(field, visitor)?;
}
Self::Floor { expr, field } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(field, visitor)?;
}
Self::Position { expr, r#in } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(r#in, visitor)?;
}
Self::Substring {
expr, substring_from, substring_for, special, shorthand } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(substring_from, visitor)?;
sqlparser::ast::VisitMut::visit(substring_for, visitor)?;
sqlparser::ast::VisitMut::visit(special, visitor)?;
sqlparser::ast::VisitMut::visit(shorthand, visitor)?;
}
Self::Trim { expr, trim_where, trim_what, trim_characters } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(trim_where, visitor)?;
sqlparser::ast::VisitMut::visit(trim_what, visitor)?;
sqlparser::ast::VisitMut::visit(trim_characters, visitor)?;
}
Self::Overlay { expr, overlay_what, overlay_from, overlay_for } =>
{
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(overlay_what, visitor)?;
sqlparser::ast::VisitMut::visit(overlay_from, visitor)?;
sqlparser::ast::VisitMut::visit(overlay_for, visitor)?;
}
Self::Collate { expr, collation } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(collation, visitor)?;
}
Self::Nested(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Value(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Prefixed { prefix, value } => {
sqlparser::ast::VisitMut::visit(prefix, visitor)?;
sqlparser::ast::VisitMut::visit(value, visitor)?;
}
Self::TypedString(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Function(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Case {
case_token, end_token, operand, conditions, else_result } => {
sqlparser::ast::VisitMut::visit(case_token, visitor)?;
sqlparser::ast::VisitMut::visit(end_token, visitor)?;
sqlparser::ast::VisitMut::visit(operand, visitor)?;
sqlparser::ast::VisitMut::visit(conditions, visitor)?;
sqlparser::ast::VisitMut::visit(else_result, visitor)?;
}
Self::Exists { subquery, negated } => {
sqlparser::ast::VisitMut::visit(subquery, visitor)?;
sqlparser::ast::VisitMut::visit(negated, visitor)?;
}
Self::Subquery(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::GroupingSets(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Cube(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Rollup(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Tuple(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Struct { values, fields } => {
sqlparser::ast::VisitMut::visit(values, visitor)?;
sqlparser::ast::VisitMut::visit(fields, visitor)?;
}
Self::Named { expr, name } => {
sqlparser::ast::VisitMut::visit(expr, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
}
Self::Dictionary(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Map(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Array(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Interval(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::MatchAgainst { columns, match_value, opt_search_modifier }
=> {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
sqlparser::ast::VisitMut::visit(match_value, visitor)?;
sqlparser::ast::VisitMut::visit(opt_search_modifier,
visitor)?;
}
Self::Wildcard(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::QualifiedWildcard(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
Self::OuterJoin(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Prior(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Lambda(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::MemberOf(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
visitor.post_visit_expr(self)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut),
731 visit(with = "visit_expr")
732)]
733pub enum Expr {
734 Identifier(Ident),
736 CompoundIdentifier(Vec<Ident>),
738 CompoundFieldAccess {
757 root: Box<Expr>,
758 access_chain: Vec<AccessExpr>,
759 },
760 JsonAccess {
766 value: Box<Expr>,
768 path: JsonPath,
770 },
771 IsFalse(Box<Expr>),
773 IsNotFalse(Box<Expr>),
775 IsTrue(Box<Expr>),
777 IsNotTrue(Box<Expr>),
779 IsNull(Box<Expr>),
781 IsNotNull(Box<Expr>),
783 IsUnknown(Box<Expr>),
785 IsNotUnknown(Box<Expr>),
787 IsDistinctFrom(Box<Expr>, Box<Expr>),
789 IsNotDistinctFrom(Box<Expr>, Box<Expr>),
791 IsNormalized {
793 expr: Box<Expr>,
794 form: Option<NormalizationForm>,
795 negated: bool,
796 },
797 InList {
799 expr: Box<Expr>,
800 list: Vec<Expr>,
801 negated: bool,
802 },
803 InSubquery {
805 expr: Box<Expr>,
806 subquery: Box<Query>,
807 negated: bool,
808 },
809 InUnnest {
811 expr: Box<Expr>,
812 array_expr: Box<Expr>,
813 negated: bool,
814 },
815 Between {
817 expr: Box<Expr>,
818 negated: bool,
819 low: Box<Expr>,
820 high: Box<Expr>,
821 },
822 BinaryOp {
824 left: Box<Expr>,
825 op: BinaryOperator,
826 right: Box<Expr>,
827 },
828 Like {
830 negated: bool,
831 any: bool,
834 expr: Box<Expr>,
835 pattern: Box<Expr>,
836 escape_char: Option<Value>,
837 },
838 ILike {
840 negated: bool,
841 any: bool,
844 expr: Box<Expr>,
845 pattern: Box<Expr>,
846 escape_char: Option<Value>,
847 },
848 SimilarTo {
850 negated: bool,
851 expr: Box<Expr>,
852 pattern: Box<Expr>,
853 escape_char: Option<Value>,
854 },
855 RLike {
857 negated: bool,
858 expr: Box<Expr>,
859 pattern: Box<Expr>,
860 regexp: bool,
862 },
863 AnyOp {
866 left: Box<Expr>,
867 compare_op: BinaryOperator,
868 right: Box<Expr>,
869 is_some: bool,
871 },
872 AllOp {
875 left: Box<Expr>,
876 compare_op: BinaryOperator,
877 right: Box<Expr>,
878 },
879 UnaryOp {
881 op: UnaryOperator,
882 expr: Box<Expr>,
883 },
884 Convert {
886 is_try: bool,
889 expr: Box<Expr>,
891 data_type: Option<DataType>,
893 charset: Option<ObjectName>,
895 target_before_value: bool,
897 styles: Vec<Expr>,
901 },
902 Cast {
904 kind: CastKind,
905 expr: Box<Expr>,
906 data_type: DataType,
907 format: Option<CastFormat>,
911 },
912 AtTimeZone {
914 timestamp: Box<Expr>,
915 time_zone: Box<Expr>,
916 },
917 Extract {
925 field: DateTimeField,
926 syntax: ExtractSyntax,
927 expr: Box<Expr>,
928 },
929 Ceil {
936 expr: Box<Expr>,
937 field: CeilFloorKind,
938 },
939 Floor {
946 expr: Box<Expr>,
947 field: CeilFloorKind,
948 },
949 Position {
953 expr: Box<Expr>,
954 r#in: Box<Expr>,
955 },
956 Substring {
964 expr: Box<Expr>,
965 substring_from: Option<Box<Expr>>,
966 substring_for: Option<Box<Expr>>,
967
968 special: bool,
972
973 shorthand: bool,
976 },
977 Trim {
983 expr: Box<Expr>,
984 trim_where: Option<TrimWhereField>,
986 trim_what: Option<Box<Expr>>,
987 trim_characters: Option<Vec<Expr>>,
988 },
989 Overlay {
993 expr: Box<Expr>,
994 overlay_what: Box<Expr>,
995 overlay_from: Box<Expr>,
996 overlay_for: Option<Box<Expr>>,
997 },
998 Collate {
1000 expr: Box<Expr>,
1001 collation: ObjectName,
1002 },
1003 Nested(Box<Expr>),
1005 Value(ValueWithSpan),
1007 Prefixed {
1011 prefix: Ident,
1012 value: Box<Expr>,
1015 },
1016 TypedString(TypedString),
1020 Function(Function),
1022 Case {
1028 case_token: AttachedToken,
1029 end_token: AttachedToken,
1030 operand: Option<Box<Expr>>,
1031 conditions: Vec<CaseWhen>,
1032 else_result: Option<Box<Expr>>,
1033 },
1034 Exists {
1037 subquery: Box<Query>,
1038 negated: bool,
1039 },
1040 Subquery(Box<Query>),
1043 GroupingSets(Vec<Vec<Expr>>),
1045 Cube(Vec<Vec<Expr>>),
1047 Rollup(Vec<Vec<Expr>>),
1049 Tuple(Vec<Expr>),
1051 Struct {
1060 values: Vec<Expr>,
1062 fields: Vec<StructField>,
1064 },
1065 Named {
1073 expr: Box<Expr>,
1074 name: Ident,
1075 },
1076 Dictionary(Vec<DictionaryField>),
1084 Map(Map),
1092 Array(Array),
1094 Interval(Interval),
1096 MatchAgainst {
1107 columns: Vec<ObjectName>,
1109 match_value: Value,
1111 opt_search_modifier: Option<SearchModifier>,
1113 },
1114 Wildcard(AttachedToken),
1115 QualifiedWildcard(ObjectName, AttachedToken),
1118 OuterJoin(Box<Expr>),
1133 Prior(Box<Expr>),
1135 Lambda(LambdaFunction),
1146 MemberOf(MemberOf),
1148}
1149
1150impl Expr {
1151 pub fn value(value: impl Into<ValueWithSpan>) -> Self {
1153 Expr::Value(value.into())
1154 }
1155}
1156
1157#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Subscript {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Subscript::Index { index: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Index",
"index", &__self_0),
Subscript::Slice {
lower_bound: __self_0, upper_bound: __self_1, stride: __self_2
} =>
::core::fmt::Formatter::debug_struct_field3_finish(f, "Slice",
"lower_bound", __self_0, "upper_bound", __self_1, "stride",
&__self_2),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Subscript {
#[inline]
fn clone(&self) -> Subscript {
match self {
Subscript::Index { index: __self_0 } =>
Subscript::Index {
index: ::core::clone::Clone::clone(__self_0),
},
Subscript::Slice {
lower_bound: __self_0, upper_bound: __self_1, stride: __self_2
} =>
Subscript::Slice {
lower_bound: ::core::clone::Clone::clone(__self_0),
upper_bound: ::core::clone::Clone::clone(__self_1),
stride: ::core::clone::Clone::clone(__self_2),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Subscript {
#[inline]
fn eq(&self, other: &Subscript) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Subscript::Index { index: __self_0 }, Subscript::Index {
index: __arg1_0 }) => __self_0 == __arg1_0,
(Subscript::Slice {
lower_bound: __self_0,
upper_bound: __self_1,
stride: __self_2 }, Subscript::Slice {
lower_bound: __arg1_0,
upper_bound: __arg1_1,
stride: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Subscript {
#[inline]
fn partial_cmp(&self, other: &Subscript)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(Subscript::Index { index: __self_0 }, Subscript::Index {
index: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Subscript::Slice {
lower_bound: __self_0, upper_bound: __self_1, stride: __self_2
}, Subscript::Slice {
lower_bound: __arg1_0, upper_bound: __arg1_1, stride: __arg1_2
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Subscript {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Subscript {
#[inline]
fn cmp(&self, other: &Subscript) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Subscript::Index { index: __self_0 }, Subscript::Index {
index: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Subscript::Slice {
lower_bound: __self_0,
upper_bound: __self_1,
stride: __self_2 }, Subscript::Slice {
lower_bound: __arg1_0,
upper_bound: __arg1_1,
stride: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Subscript {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Subscript::Index { index: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Subscript::Slice {
lower_bound: __self_0, upper_bound: __self_1, stride: __self_2
} => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
}
}
}Hash)]
1159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1160#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Subscript {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Index { index } => {
sqlparser::ast::Visit::visit(index, visitor)?;
}
Self::Slice { lower_bound, upper_bound, stride } => {
sqlparser::ast::Visit::visit(lower_bound, visitor)?;
sqlparser::ast::Visit::visit(upper_bound, visitor)?;
sqlparser::ast::Visit::visit(stride, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Subscript {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Index { index } => {
sqlparser::ast::VisitMut::visit(index, visitor)?;
}
Self::Slice { lower_bound, upper_bound, stride } => {
sqlparser::ast::VisitMut::visit(lower_bound, visitor)?;
sqlparser::ast::VisitMut::visit(upper_bound, visitor)?;
sqlparser::ast::VisitMut::visit(stride, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
1161pub enum Subscript {
1162 Index { index: Expr },
1164
1165 Slice {
1187 lower_bound: Option<Expr>,
1188 upper_bound: Option<Expr>,
1189 stride: Option<Expr>,
1190 },
1191}
1192
1193impl fmt::Display for Subscript {
1194 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1195 match self {
1196 Subscript::Index { index } => f.write_fmt(format_args!("{0}", index))write!(f, "{index}"),
1197 Subscript::Slice {
1198 lower_bound,
1199 upper_bound,
1200 stride,
1201 } => {
1202 if let Some(lower) = lower_bound {
1203 f.write_fmt(format_args!("{0}", lower))write!(f, "{lower}")?;
1204 }
1205 f.write_fmt(format_args!(":"))write!(f, ":")?;
1206 if let Some(upper) = upper_bound {
1207 f.write_fmt(format_args!("{0}", upper))write!(f, "{upper}")?;
1208 }
1209 if let Some(stride) = stride {
1210 f.write_fmt(format_args!(":"))write!(f, ":")?;
1211 f.write_fmt(format_args!("{0}", stride))write!(f, "{stride}")?;
1212 }
1213 Ok(())
1214 }
1215 }
1216 }
1217}
1218
1219#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AccessExpr {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
AccessExpr::Dot(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Dot",
&__self_0),
AccessExpr::Subscript(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Subscript", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AccessExpr {
#[inline]
fn clone(&self) -> AccessExpr {
match self {
AccessExpr::Dot(__self_0) =>
AccessExpr::Dot(::core::clone::Clone::clone(__self_0)),
AccessExpr::Subscript(__self_0) =>
AccessExpr::Subscript(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AccessExpr {
#[inline]
fn eq(&self, other: &AccessExpr) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(AccessExpr::Dot(__self_0), AccessExpr::Dot(__arg1_0)) =>
__self_0 == __arg1_0,
(AccessExpr::Subscript(__self_0),
AccessExpr::Subscript(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AccessExpr {
#[inline]
fn partial_cmp(&self, other: &AccessExpr)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(AccessExpr::Dot(__self_0), AccessExpr::Dot(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(AccessExpr::Subscript(__self_0), AccessExpr::Subscript(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AccessExpr {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<Subscript>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AccessExpr {
#[inline]
fn cmp(&self, other: &AccessExpr) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(AccessExpr::Dot(__self_0), AccessExpr::Dot(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(AccessExpr::Subscript(__self_0),
AccessExpr::Subscript(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AccessExpr {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
AccessExpr::Dot(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
AccessExpr::Subscript(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
1222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1223#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AccessExpr {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Dot(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Subscript(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for AccessExpr {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Dot(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Subscript(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
1224pub enum AccessExpr {
1225 Dot(Expr),
1227 Subscript(Subscript),
1229}
1230
1231impl fmt::Display for AccessExpr {
1232 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1233 match self {
1234 AccessExpr::Dot(expr) => f.write_fmt(format_args!(".{0}", expr))write!(f, ".{expr}"),
1235 AccessExpr::Subscript(subscript) => f.write_fmt(format_args!("[{0}]", subscript))write!(f, "[{subscript}]"),
1236 }
1237 }
1238}
1239
1240#[derive(#[automatically_derived]
impl ::core::fmt::Debug for LambdaFunction {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"LambdaFunction", "params", &self.params, "body", &&self.body)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for LambdaFunction {
#[inline]
fn clone(&self) -> LambdaFunction {
LambdaFunction {
params: ::core::clone::Clone::clone(&self.params),
body: ::core::clone::Clone::clone(&self.body),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for LambdaFunction {
#[inline]
fn eq(&self, other: &LambdaFunction) -> bool {
self.params == other.params && self.body == other.body
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for LambdaFunction {
#[inline]
fn partial_cmp(&self, other: &LambdaFunction)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.params,
&other.params) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.body, &other.body),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for LambdaFunction {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<OneOrManyWithParens<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for LambdaFunction {
#[inline]
fn cmp(&self, other: &LambdaFunction) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.params, &other.params) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.body, &other.body),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for LambdaFunction {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.params, state);
::core::hash::Hash::hash(&self.body, state)
}
}Hash)]
1242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1243#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for LambdaFunction {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.params, visitor)?;
sqlparser::ast::Visit::visit(&self.body, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for LambdaFunction {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.params, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.body, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
1244pub struct LambdaFunction {
1245 pub params: OneOrManyWithParens<Ident>,
1247 pub body: Box<Expr>,
1249}
1250
1251impl fmt::Display for LambdaFunction {
1252 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1253 f.write_fmt(format_args!("{0} -> {1}", self.params, self.body))write!(f, "{} -> {}", self.params, self.body)
1254 }
1255}
1256
1257#[derive(#[automatically_derived]
impl<T: ::core::fmt::Debug> ::core::fmt::Debug for OneOrManyWithParens<T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
OneOrManyWithParens::One(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "One",
&__self_0),
OneOrManyWithParens::Many(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Many",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl<T: ::core::clone::Clone> ::core::clone::Clone for OneOrManyWithParens<T>
{
#[inline]
fn clone(&self) -> OneOrManyWithParens<T> {
match self {
OneOrManyWithParens::One(__self_0) =>
OneOrManyWithParens::One(::core::clone::Clone::clone(__self_0)),
OneOrManyWithParens::Many(__self_0) =>
OneOrManyWithParens::Many(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl<T: ::core::cmp::PartialEq> ::core::cmp::PartialEq for
OneOrManyWithParens<T> {
#[inline]
fn eq(&self, other: &OneOrManyWithParens<T>) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(OneOrManyWithParens::One(__self_0),
OneOrManyWithParens::One(__arg1_0)) => __self_0 == __arg1_0,
(OneOrManyWithParens::Many(__self_0),
OneOrManyWithParens::Many(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl<T: ::core::cmp::PartialOrd> ::core::cmp::PartialOrd for
OneOrManyWithParens<T> {
#[inline]
fn partial_cmp(&self, other: &OneOrManyWithParens<T>)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(OneOrManyWithParens::One(__self_0),
OneOrManyWithParens::One(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(OneOrManyWithParens::Many(__self_0),
OneOrManyWithParens::Many(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl<T: ::core::cmp::Eq> ::core::cmp::Eq for OneOrManyWithParens<T> {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<T>;
let _: ::core::cmp::AssertParamIsEq<Vec<T>>;
}
}Eq, #[automatically_derived]
impl<T: ::core::cmp::Ord> ::core::cmp::Ord for OneOrManyWithParens<T> {
#[inline]
fn cmp(&self, other: &OneOrManyWithParens<T>) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(OneOrManyWithParens::One(__self_0),
OneOrManyWithParens::One(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(OneOrManyWithParens::Many(__self_0),
OneOrManyWithParens::Many(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl<T: ::core::hash::Hash> ::core::hash::Hash for OneOrManyWithParens<T> {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
OneOrManyWithParens::One(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
OneOrManyWithParens::Many(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
1280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1281#[cfg_attr(feature = "visitor", derive(impl<T: sqlparser::ast::Visit> sqlparser::ast::Visit for
OneOrManyWithParens<T> {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::One(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Many(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl<T: sqlparser::ast::VisitMut> sqlparser::ast::VisitMut for
OneOrManyWithParens<T> {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::One(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Many(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
1282pub enum OneOrManyWithParens<T> {
1283 One(T),
1285 Many(Vec<T>),
1287}
1288
1289impl<T> Deref for OneOrManyWithParens<T> {
1290 type Target = [T];
1291
1292 fn deref(&self) -> &[T] {
1293 match self {
1294 OneOrManyWithParens::One(one) => core::slice::from_ref(one),
1295 OneOrManyWithParens::Many(many) => many,
1296 }
1297 }
1298}
1299
1300impl<T> AsRef<[T]> for OneOrManyWithParens<T> {
1301 fn as_ref(&self) -> &[T] {
1302 self
1303 }
1304}
1305
1306impl<'a, T> IntoIterator for &'a OneOrManyWithParens<T> {
1307 type Item = &'a T;
1308 type IntoIter = core::slice::Iter<'a, T>;
1309
1310 fn into_iter(self) -> Self::IntoIter {
1311 self.iter()
1312 }
1313}
1314
1315#[derive(#[automatically_derived]
impl<T: ::core::fmt::Debug> ::core::fmt::Debug for
OneOrManyWithParensIntoIter<T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"OneOrManyWithParensIntoIter", "inner", &&self.inner)
}
}Debug, #[automatically_derived]
impl<T: ::core::clone::Clone> ::core::clone::Clone for
OneOrManyWithParensIntoIter<T> {
#[inline]
fn clone(&self) -> OneOrManyWithParensIntoIter<T> {
OneOrManyWithParensIntoIter {
inner: ::core::clone::Clone::clone(&self.inner),
}
}
}Clone)]
1317pub struct OneOrManyWithParensIntoIter<T> {
1318 inner: OneOrManyWithParensIntoIterInner<T>,
1319}
1320
1321#[derive(#[automatically_derived]
impl<T: ::core::fmt::Debug> ::core::fmt::Debug for
OneOrManyWithParensIntoIterInner<T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
OneOrManyWithParensIntoIterInner::One(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "One",
&__self_0),
OneOrManyWithParensIntoIterInner::Many(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Many",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl<T: ::core::clone::Clone> ::core::clone::Clone for
OneOrManyWithParensIntoIterInner<T> {
#[inline]
fn clone(&self) -> OneOrManyWithParensIntoIterInner<T> {
match self {
OneOrManyWithParensIntoIterInner::One(__self_0) =>
OneOrManyWithParensIntoIterInner::One(::core::clone::Clone::clone(__self_0)),
OneOrManyWithParensIntoIterInner::Many(__self_0) =>
OneOrManyWithParensIntoIterInner::Many(::core::clone::Clone::clone(__self_0)),
}
}
}Clone)]
1322enum OneOrManyWithParensIntoIterInner<T> {
1323 One(core::iter::Once<T>),
1324 Many(<Vec<T> as IntoIterator>::IntoIter),
1325}
1326
1327impl<T> core::iter::FusedIterator for OneOrManyWithParensIntoIter<T>
1328where
1329 core::iter::Once<T>: core::iter::FusedIterator,
1330 <Vec<T> as IntoIterator>::IntoIter: core::iter::FusedIterator,
1331{
1332}
1333
1334impl<T> core::iter::ExactSizeIterator for OneOrManyWithParensIntoIter<T>
1335where
1336 core::iter::Once<T>: core::iter::ExactSizeIterator,
1337 <Vec<T> as IntoIterator>::IntoIter: core::iter::ExactSizeIterator,
1338{
1339}
1340
1341impl<T> core::iter::Iterator for OneOrManyWithParensIntoIter<T> {
1342 type Item = T;
1343
1344 fn next(&mut self) -> Option<Self::Item> {
1345 match &mut self.inner {
1346 OneOrManyWithParensIntoIterInner::One(one) => one.next(),
1347 OneOrManyWithParensIntoIterInner::Many(many) => many.next(),
1348 }
1349 }
1350
1351 fn size_hint(&self) -> (usize, Option<usize>) {
1352 match &self.inner {
1353 OneOrManyWithParensIntoIterInner::One(one) => one.size_hint(),
1354 OneOrManyWithParensIntoIterInner::Many(many) => many.size_hint(),
1355 }
1356 }
1357
1358 fn count(self) -> usize
1359 where
1360 Self: Sized,
1361 {
1362 match self.inner {
1363 OneOrManyWithParensIntoIterInner::One(one) => one.count(),
1364 OneOrManyWithParensIntoIterInner::Many(many) => many.count(),
1365 }
1366 }
1367
1368 fn fold<B, F>(mut self, init: B, f: F) -> B
1369 where
1370 Self: Sized,
1371 F: FnMut(B, Self::Item) -> B,
1372 {
1373 match &mut self.inner {
1374 OneOrManyWithParensIntoIterInner::One(one) => one.fold(init, f),
1375 OneOrManyWithParensIntoIterInner::Many(many) => many.fold(init, f),
1376 }
1377 }
1378}
1379
1380impl<T> core::iter::DoubleEndedIterator for OneOrManyWithParensIntoIter<T> {
1381 fn next_back(&mut self) -> Option<Self::Item> {
1382 match &mut self.inner {
1383 OneOrManyWithParensIntoIterInner::One(one) => one.next_back(),
1384 OneOrManyWithParensIntoIterInner::Many(many) => many.next_back(),
1385 }
1386 }
1387}
1388
1389impl<T> IntoIterator for OneOrManyWithParens<T> {
1390 type Item = T;
1391
1392 type IntoIter = OneOrManyWithParensIntoIter<T>;
1393
1394 fn into_iter(self) -> Self::IntoIter {
1395 let inner = match self {
1396 OneOrManyWithParens::One(one) => {
1397 OneOrManyWithParensIntoIterInner::One(core::iter::once(one))
1398 }
1399 OneOrManyWithParens::Many(many) => {
1400 OneOrManyWithParensIntoIterInner::Many(many.into_iter())
1401 }
1402 };
1403
1404 OneOrManyWithParensIntoIter { inner }
1405 }
1406}
1407
1408impl<T> fmt::Display for OneOrManyWithParens<T>
1409where
1410 T: fmt::Display,
1411{
1412 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1413 match self {
1414 OneOrManyWithParens::One(value) => f.write_fmt(format_args!("{0}", value))write!(f, "{value}"),
1415 OneOrManyWithParens::Many(values) => {
1416 f.write_fmt(format_args!("({0})", display_comma_separated(values)))write!(f, "({})", display_comma_separated(values))
1417 }
1418 }
1419 }
1420}
1421
1422impl fmt::Display for CastFormat {
1423 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1424 match self {
1425 CastFormat::Value(v) => f.write_fmt(format_args!("{0}", v))write!(f, "{v}"),
1426 CastFormat::ValueAtTimeZone(v, tz) => f.write_fmt(format_args!("{0} AT TIME ZONE {1}", v, tz))write!(f, "{v} AT TIME ZONE {tz}"),
1427 }
1428 }
1429}
1430
1431impl fmt::Display for Expr {
1432 #[cfg_attr(feature = "recursive-protection", ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
::recursive::get_stack_allocation_size(),
move || -> fmt::Result
{
{
match self {
Expr::Identifier(s) => f.write_fmt(format_args!("{0}", s)),
Expr::Wildcard(_) => f.write_str("*"),
Expr::QualifiedWildcard(prefix, _) =>
f.write_fmt(format_args!("{0}.*", prefix)),
Expr::CompoundIdentifier(s) =>
f.write_fmt(format_args!("{0}", display_separated(s, "."))),
Expr::CompoundFieldAccess { root, access_chain } => {
f.write_fmt(format_args!("{0}", root))?;
for field in access_chain {
f.write_fmt(format_args!("{0}", field))?;
}
Ok(())
}
Expr::IsTrue(ast) =>
f.write_fmt(format_args!("{0} IS TRUE", ast)),
Expr::IsNotTrue(ast) =>
f.write_fmt(format_args!("{0} IS NOT TRUE", ast)),
Expr::IsFalse(ast) =>
f.write_fmt(format_args!("{0} IS FALSE", ast)),
Expr::IsNotFalse(ast) =>
f.write_fmt(format_args!("{0} IS NOT FALSE", ast)),
Expr::IsNull(ast) =>
f.write_fmt(format_args!("{0} IS NULL", ast)),
Expr::IsNotNull(ast) =>
f.write_fmt(format_args!("{0} IS NOT NULL", ast)),
Expr::IsUnknown(ast) =>
f.write_fmt(format_args!("{0} IS UNKNOWN", ast)),
Expr::IsNotUnknown(ast) =>
f.write_fmt(format_args!("{0} IS NOT UNKNOWN", ast)),
Expr::InList { expr, list, negated } =>
f.write_fmt(format_args!("{0} {1}IN ({2})", expr,
if *negated { "NOT " } else { "" },
display_comma_separated(list))),
Expr::InSubquery { expr, subquery, negated } =>
f.write_fmt(format_args!("{0} {1}IN ({2})", expr,
if *negated { "NOT " } else { "" }, subquery)),
Expr::InUnnest { expr, array_expr, negated } =>
f.write_fmt(format_args!("{0} {1}IN UNNEST({2})", expr,
if *negated { "NOT " } else { "" }, array_expr)),
Expr::Between { expr, negated, low, high } =>
f.write_fmt(format_args!("{0} {1}BETWEEN {2} AND {3}", expr,
if *negated { "NOT " } else { "" }, low, high)),
Expr::BinaryOp { left, op, right } =>
f.write_fmt(format_args!("{0} {1} {2}", left, op, right)),
Expr::Like { negated, expr, pattern, escape_char, any } =>
match escape_char {
Some(ch) =>
f.write_fmt(format_args!("{0} {1}LIKE {2}{3} ESCAPE {4}",
expr, if *negated { "NOT " } else { "" },
if *any { "ANY " } else { "" }, pattern, ch)),
_ =>
f.write_fmt(format_args!("{0} {1}LIKE {2}{3}", expr,
if *negated { "NOT " } else { "" },
if *any { "ANY " } else { "" }, pattern)),
},
Expr::ILike { negated, expr, pattern, escape_char, any } =>
match escape_char {
Some(ch) =>
f.write_fmt(format_args!("{0} {1}ILIKE {2}{3} ESCAPE {4}",
expr, if *negated { "NOT " } else { "" },
if *any { "ANY" } else { "" }, pattern, ch)),
_ =>
f.write_fmt(format_args!("{0} {1}ILIKE {2}{3}", expr,
if *negated { "NOT " } else { "" },
if *any { "ANY " } else { "" }, pattern)),
},
Expr::RLike { negated, expr, pattern, regexp } =>
f.write_fmt(format_args!("{0} {1}{2} {3}", expr,
if *negated { "NOT " } else { "" },
if *regexp { "REGEXP" } else { "RLIKE" }, pattern)),
Expr::IsNormalized { expr, form, negated } => {
let not_ = if *negated { "NOT " } else { "" };
if form.is_none() {
f.write_fmt(format_args!("{0} IS {1}NORMALIZED", expr,
not_))
} else {
f.write_fmt(format_args!("{0} IS {1}{2} NORMALIZED", expr,
not_, form.as_ref().unwrap()))
}
}
Expr::SimilarTo { negated, expr, pattern, escape_char } =>
match escape_char {
Some(ch) =>
f.write_fmt(format_args!("{0} {1}SIMILAR TO {2} ESCAPE {3}",
expr, if *negated { "NOT " } else { "" }, pattern, ch)),
_ =>
f.write_fmt(format_args!("{0} {1}SIMILAR TO {2}", expr,
if *negated { "NOT " } else { "" }, pattern)),
},
Expr::AnyOp { left, compare_op, right, is_some } => {
let add_parens =
!#[allow(non_exhaustive_omitted_patterns)] match right.as_ref()
{
Expr::Subquery(_) => true,
_ => false,
};
f.write_fmt(format_args!("{3} {4} {0}{1}{5}{2}",
if *is_some { "SOME" } else { "ANY" },
if add_parens { "(" } else { "" },
if add_parens { ")" } else { "" }, left, compare_op, right))
}
Expr::AllOp { left, compare_op, right } => {
let add_parens =
!#[allow(non_exhaustive_omitted_patterns)] match right.as_ref()
{
Expr::Subquery(_) => true,
_ => false,
};
f.write_fmt(format_args!("{2} {3} ALL{0}{4}{1}",
if add_parens { "(" } else { "" },
if add_parens { ")" } else { "" }, left, compare_op, right))
}
Expr::UnaryOp { op, expr } => {
if op == &UnaryOperator::PGPostfixFactorial {
f.write_fmt(format_args!("{0}{1}", expr, op))
} else if #[allow(non_exhaustive_omitted_patterns)] match op
{
UnaryOperator::Not | UnaryOperator::Hash |
UnaryOperator::AtDashAt | UnaryOperator::DoubleAt |
UnaryOperator::QuestionDash | UnaryOperator::QuestionPipe =>
true,
_ => false,
} {
f.write_fmt(format_args!("{0} {1}", op, expr))
} else { f.write_fmt(format_args!("{0}{1}", op, expr)) }
}
Expr::Convert {
is_try,
expr,
target_before_value,
data_type,
charset,
styles } => {
f.write_fmt(format_args!("{0}CONVERT(",
if *is_try { "TRY_" } else { "" }))?;
if let Some(data_type) = data_type {
if let Some(charset) = charset {
f.write_fmt(format_args!("{0}, {1} CHARACTER SET {2}", expr,
data_type, charset))
} else if *target_before_value {
f.write_fmt(format_args!("{0}, {1}", data_type, expr))
} else {
f.write_fmt(format_args!("{0}, {1}", expr, data_type))
}
} else if let Some(charset) = charset {
f.write_fmt(format_args!("{0} USING {1}", expr, charset))
} else { f.write_fmt(format_args!("{0}", expr)) }?;
if !styles.is_empty() {
f.write_fmt(format_args!(", {0}",
display_comma_separated(styles)))?;
}
f.write_fmt(format_args!(")"))
}
Expr::Cast { kind, expr, data_type, format } =>
match kind {
CastKind::Cast => {
if let Some(format) = format {
f.write_fmt(format_args!("CAST({0} AS {1} FORMAT {2})",
expr, data_type, format))
} else {
f.write_fmt(format_args!("CAST({0} AS {1})", expr,
data_type))
}
}
CastKind::TryCast => {
if let Some(format) = format {
f.write_fmt(format_args!("TRY_CAST({0} AS {1} FORMAT {2})",
expr, data_type, format))
} else {
f.write_fmt(format_args!("TRY_CAST({0} AS {1})", expr,
data_type))
}
}
CastKind::SafeCast => {
if let Some(format) = format {
f.write_fmt(format_args!("SAFE_CAST({0} AS {1} FORMAT {2})",
expr, data_type, format))
} else {
f.write_fmt(format_args!("SAFE_CAST({0} AS {1})", expr,
data_type))
}
}
CastKind::DoubleColon => {
f.write_fmt(format_args!("{0}::{1}", expr, data_type))
}
},
Expr::Extract { field, syntax, expr } =>
match syntax {
ExtractSyntax::From =>
f.write_fmt(format_args!("EXTRACT({0} FROM {1})", field,
expr)),
ExtractSyntax::Comma =>
f.write_fmt(format_args!("EXTRACT({0}, {1})", field, expr)),
},
Expr::Ceil { expr, field } =>
match field {
CeilFloorKind::DateTimeField(DateTimeField::NoDateTime) => {
f.write_fmt(format_args!("CEIL({0})", expr))
}
CeilFloorKind::DateTimeField(dt_field) =>
f.write_fmt(format_args!("CEIL({0} TO {1})", expr,
dt_field)),
CeilFloorKind::Scale(s) =>
f.write_fmt(format_args!("CEIL({0}, {1})", expr, s)),
},
Expr::Floor { expr, field } =>
match field {
CeilFloorKind::DateTimeField(DateTimeField::NoDateTime) => {
f.write_fmt(format_args!("FLOOR({0})", expr))
}
CeilFloorKind::DateTimeField(dt_field) =>
f.write_fmt(format_args!("FLOOR({0} TO {1})", expr,
dt_field)),
CeilFloorKind::Scale(s) =>
f.write_fmt(format_args!("FLOOR({0}, {1})", expr, s)),
},
Expr::Position { expr, r#in } =>
f.write_fmt(format_args!("POSITION({0} IN {1})", expr,
r#in)),
Expr::Collate { expr, collation } =>
f.write_fmt(format_args!("{0} COLLATE {1}", expr,
collation)),
Expr::Nested(ast) =>
f.write_fmt(format_args!("({0})", ast)),
Expr::Value(v) => f.write_fmt(format_args!("{0}", v)),
Expr::Prefixed { prefix, value } =>
f.write_fmt(format_args!("{0} {1}", prefix, value)),
Expr::TypedString(ts) => ts.fmt(f),
Expr::Function(fun) => fun.fmt(f),
Expr::Case {
case_token: _,
end_token: _,
operand,
conditions,
else_result } => {
f.write_str("CASE")?;
if let Some(operand) = operand {
f.write_str(" ")?;
operand.fmt(f)?;
}
for when in conditions {
SpaceOrNewline.fmt(f)?;
Indent(when).fmt(f)?;
}
if let Some(else_result) = else_result {
SpaceOrNewline.fmt(f)?;
Indent("ELSE").fmt(f)?;
SpaceOrNewline.fmt(f)?;
Indent(Indent(else_result)).fmt(f)?;
}
SpaceOrNewline.fmt(f)?;
f.write_str("END")
}
Expr::Exists { subquery, negated } =>
f.write_fmt(format_args!("{0}EXISTS ({1})",
if *negated { "NOT " } else { "" }, subquery)),
Expr::Subquery(s) => f.write_fmt(format_args!("({0})", s)),
Expr::GroupingSets(sets) => {
f.write_fmt(format_args!("GROUPING SETS ("))?;
let mut sep = "";
for set in sets {
f.write_fmt(format_args!("{0}", sep))?;
sep = ", ";
f.write_fmt(format_args!("({0})",
display_comma_separated(set)))?;
}
f.write_fmt(format_args!(")"))
}
Expr::Cube(sets) => {
f.write_fmt(format_args!("CUBE ("))?;
let mut sep = "";
for set in sets {
f.write_fmt(format_args!("{0}", sep))?;
sep = ", ";
if set.len() == 1 {
f.write_fmt(format_args!("{0}", set[0]))?;
} else {
f.write_fmt(format_args!("({0})",
display_comma_separated(set)))?;
}
}
f.write_fmt(format_args!(")"))
}
Expr::Rollup(sets) => {
f.write_fmt(format_args!("ROLLUP ("))?;
let mut sep = "";
for set in sets {
f.write_fmt(format_args!("{0}", sep))?;
sep = ", ";
if set.len() == 1 {
f.write_fmt(format_args!("{0}", set[0]))?;
} else {
f.write_fmt(format_args!("({0})",
display_comma_separated(set)))?;
}
}
f.write_fmt(format_args!(")"))
}
Expr::Substring {
expr, substring_from, substring_for, special, shorthand } =>
{
f.write_str("SUBSTR")?;
if !*shorthand { f.write_str("ING")?; }
f.write_fmt(format_args!("({0}", expr))?;
if let Some(from_part) = substring_from {
if *special {
f.write_fmt(format_args!(", {0}", from_part))?;
} else {
f.write_fmt(format_args!(" FROM {0}", from_part))?;
}
}
if let Some(for_part) = substring_for {
if *special {
f.write_fmt(format_args!(", {0}", for_part))?;
} else { f.write_fmt(format_args!(" FOR {0}", for_part))?; }
}
f.write_fmt(format_args!(")"))
}
Expr::Overlay {
expr, overlay_what, overlay_from, overlay_for } => {
f.write_fmt(format_args!("OVERLAY({0} PLACING {1} FROM {2}",
expr, overlay_what, overlay_from))?;
if let Some(for_part) = overlay_for {
f.write_fmt(format_args!(" FOR {0}", for_part))?;
}
f.write_fmt(format_args!(")"))
}
Expr::IsDistinctFrom(a, b) =>
f.write_fmt(format_args!("{0} IS DISTINCT FROM {1}", a, b)),
Expr::IsNotDistinctFrom(a, b) =>
f.write_fmt(format_args!("{0} IS NOT DISTINCT FROM {1}", a,
b)),
Expr::Trim { expr, trim_where, trim_what, trim_characters }
=> {
f.write_fmt(format_args!("TRIM("))?;
if let Some(ident) = trim_where {
f.write_fmt(format_args!("{0} ", ident))?;
}
if let Some(trim_char) = trim_what {
f.write_fmt(format_args!("{0} FROM {1}", trim_char, expr))?;
} else { f.write_fmt(format_args!("{0}", expr))?; }
if let Some(characters) = trim_characters {
f.write_fmt(format_args!(", {0}",
display_comma_separated(characters)))?;
}
f.write_fmt(format_args!(")"))
}
Expr::Tuple(exprs) => {
f.write_fmt(format_args!("({0})",
display_comma_separated(exprs)))
}
Expr::Struct { values, fields } => {
if !fields.is_empty() {
f.write_fmt(format_args!("STRUCT<{0}>({1})",
display_comma_separated(fields),
display_comma_separated(values)))
} else {
f.write_fmt(format_args!("STRUCT({0})",
display_comma_separated(values)))
}
}
Expr::Named { expr, name } => {
f.write_fmt(format_args!("{0} AS {1}", expr, name))
}
Expr::Dictionary(fields) => {
f.write_fmt(format_args!("{{{0}}}",
display_comma_separated(fields)))
}
Expr::Map(map) => { f.write_fmt(format_args!("{0}", map)) }
Expr::Array(set) => {
f.write_fmt(format_args!("{0}", set))
}
Expr::JsonAccess { value, path } => {
f.write_fmt(format_args!("{0}{1}", value, path))
}
Expr::AtTimeZone { timestamp, time_zone } => {
f.write_fmt(format_args!("{0} AT TIME ZONE {1}", timestamp,
time_zone))
}
Expr::Interval(interval) => {
f.write_fmt(format_args!("{0}", interval))
}
Expr::MatchAgainst {
columns, match_value: match_expr, opt_search_modifier } => {
f.write_fmt(format_args!("MATCH ({0}) AGAINST ",
display_comma_separated(columns)))?;
if let Some(search_modifier) = opt_search_modifier {
f.write_fmt(format_args!("({0} {1})", match_expr,
search_modifier))?;
} else { f.write_fmt(format_args!("({0})", match_expr))?; }
Ok(())
}
Expr::OuterJoin(expr) => {
f.write_fmt(format_args!("{0} (+)", expr))
}
Expr::Prior(expr) =>
f.write_fmt(format_args!("PRIOR {0}", expr)),
Expr::Lambda(lambda) =>
f.write_fmt(format_args!("{0}", lambda)),
Expr::MemberOf(member_of) =>
f.write_fmt(format_args!("{0}", member_of)),
}
}
});recursive::recursive)]
1433 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1434 match self {
1435 Expr::Identifier(s) => write!(f, "{s}"),
1436 Expr::Wildcard(_) => f.write_str("*"),
1437 Expr::QualifiedWildcard(prefix, _) => write!(f, "{prefix}.*"),
1438 Expr::CompoundIdentifier(s) => write!(f, "{}", display_separated(s, ".")),
1439 Expr::CompoundFieldAccess { root, access_chain } => {
1440 write!(f, "{root}")?;
1441 for field in access_chain {
1442 write!(f, "{field}")?;
1443 }
1444 Ok(())
1445 }
1446 Expr::IsTrue(ast) => write!(f, "{ast} IS TRUE"),
1447 Expr::IsNotTrue(ast) => write!(f, "{ast} IS NOT TRUE"),
1448 Expr::IsFalse(ast) => write!(f, "{ast} IS FALSE"),
1449 Expr::IsNotFalse(ast) => write!(f, "{ast} IS NOT FALSE"),
1450 Expr::IsNull(ast) => write!(f, "{ast} IS NULL"),
1451 Expr::IsNotNull(ast) => write!(f, "{ast} IS NOT NULL"),
1452 Expr::IsUnknown(ast) => write!(f, "{ast} IS UNKNOWN"),
1453 Expr::IsNotUnknown(ast) => write!(f, "{ast} IS NOT UNKNOWN"),
1454 Expr::InList {
1455 expr,
1456 list,
1457 negated,
1458 } => write!(
1459 f,
1460 "{} {}IN ({})",
1461 expr,
1462 if *negated { "NOT " } else { "" },
1463 display_comma_separated(list)
1464 ),
1465 Expr::InSubquery {
1466 expr,
1467 subquery,
1468 negated,
1469 } => write!(
1470 f,
1471 "{} {}IN ({})",
1472 expr,
1473 if *negated { "NOT " } else { "" },
1474 subquery
1475 ),
1476 Expr::InUnnest {
1477 expr,
1478 array_expr,
1479 negated,
1480 } => write!(
1481 f,
1482 "{} {}IN UNNEST({})",
1483 expr,
1484 if *negated { "NOT " } else { "" },
1485 array_expr
1486 ),
1487 Expr::Between {
1488 expr,
1489 negated,
1490 low,
1491 high,
1492 } => write!(
1493 f,
1494 "{} {}BETWEEN {} AND {}",
1495 expr,
1496 if *negated { "NOT " } else { "" },
1497 low,
1498 high
1499 ),
1500 Expr::BinaryOp { left, op, right } => write!(f, "{left} {op} {right}"),
1501 Expr::Like {
1502 negated,
1503 expr,
1504 pattern,
1505 escape_char,
1506 any,
1507 } => match escape_char {
1508 Some(ch) => write!(
1509 f,
1510 "{} {}LIKE {}{} ESCAPE {}",
1511 expr,
1512 if *negated { "NOT " } else { "" },
1513 if *any { "ANY " } else { "" },
1514 pattern,
1515 ch
1516 ),
1517 _ => write!(
1518 f,
1519 "{} {}LIKE {}{}",
1520 expr,
1521 if *negated { "NOT " } else { "" },
1522 if *any { "ANY " } else { "" },
1523 pattern
1524 ),
1525 },
1526 Expr::ILike {
1527 negated,
1528 expr,
1529 pattern,
1530 escape_char,
1531 any,
1532 } => match escape_char {
1533 Some(ch) => write!(
1534 f,
1535 "{} {}ILIKE {}{} ESCAPE {}",
1536 expr,
1537 if *negated { "NOT " } else { "" },
1538 if *any { "ANY" } else { "" },
1539 pattern,
1540 ch
1541 ),
1542 _ => write!(
1543 f,
1544 "{} {}ILIKE {}{}",
1545 expr,
1546 if *negated { "NOT " } else { "" },
1547 if *any { "ANY " } else { "" },
1548 pattern
1549 ),
1550 },
1551 Expr::RLike {
1552 negated,
1553 expr,
1554 pattern,
1555 regexp,
1556 } => write!(
1557 f,
1558 "{} {}{} {}",
1559 expr,
1560 if *negated { "NOT " } else { "" },
1561 if *regexp { "REGEXP" } else { "RLIKE" },
1562 pattern
1563 ),
1564 Expr::IsNormalized {
1565 expr,
1566 form,
1567 negated,
1568 } => {
1569 let not_ = if *negated { "NOT " } else { "" };
1570 if form.is_none() {
1571 write!(f, "{expr} IS {not_}NORMALIZED")
1572 } else {
1573 write!(
1574 f,
1575 "{} IS {}{} NORMALIZED",
1576 expr,
1577 not_,
1578 form.as_ref().unwrap()
1579 )
1580 }
1581 }
1582 Expr::SimilarTo {
1583 negated,
1584 expr,
1585 pattern,
1586 escape_char,
1587 } => match escape_char {
1588 Some(ch) => write!(
1589 f,
1590 "{} {}SIMILAR TO {} ESCAPE {}",
1591 expr,
1592 if *negated { "NOT " } else { "" },
1593 pattern,
1594 ch
1595 ),
1596 _ => write!(
1597 f,
1598 "{} {}SIMILAR TO {}",
1599 expr,
1600 if *negated { "NOT " } else { "" },
1601 pattern
1602 ),
1603 },
1604 Expr::AnyOp {
1605 left,
1606 compare_op,
1607 right,
1608 is_some,
1609 } => {
1610 let add_parens = !matches!(right.as_ref(), Expr::Subquery(_));
1611 write!(
1612 f,
1613 "{left} {compare_op} {}{}{right}{}",
1614 if *is_some { "SOME" } else { "ANY" },
1615 if add_parens { "(" } else { "" },
1616 if add_parens { ")" } else { "" },
1617 )
1618 }
1619 Expr::AllOp {
1620 left,
1621 compare_op,
1622 right,
1623 } => {
1624 let add_parens = !matches!(right.as_ref(), Expr::Subquery(_));
1625 write!(
1626 f,
1627 "{left} {compare_op} ALL{}{right}{}",
1628 if add_parens { "(" } else { "" },
1629 if add_parens { ")" } else { "" },
1630 )
1631 }
1632 Expr::UnaryOp { op, expr } => {
1633 if op == &UnaryOperator::PGPostfixFactorial {
1634 write!(f, "{expr}{op}")
1635 } else if matches!(
1636 op,
1637 UnaryOperator::Not
1638 | UnaryOperator::Hash
1639 | UnaryOperator::AtDashAt
1640 | UnaryOperator::DoubleAt
1641 | UnaryOperator::QuestionDash
1642 | UnaryOperator::QuestionPipe
1643 ) {
1644 write!(f, "{op} {expr}")
1645 } else {
1646 write!(f, "{op}{expr}")
1647 }
1648 }
1649 Expr::Convert {
1650 is_try,
1651 expr,
1652 target_before_value,
1653 data_type,
1654 charset,
1655 styles,
1656 } => {
1657 write!(f, "{}CONVERT(", if *is_try { "TRY_" } else { "" })?;
1658 if let Some(data_type) = data_type {
1659 if let Some(charset) = charset {
1660 write!(f, "{expr}, {data_type} CHARACTER SET {charset}")
1661 } else if *target_before_value {
1662 write!(f, "{data_type}, {expr}")
1663 } else {
1664 write!(f, "{expr}, {data_type}")
1665 }
1666 } else if let Some(charset) = charset {
1667 write!(f, "{expr} USING {charset}")
1668 } else {
1669 write!(f, "{expr}") }?;
1671 if !styles.is_empty() {
1672 write!(f, ", {}", display_comma_separated(styles))?;
1673 }
1674 write!(f, ")")
1675 }
1676 Expr::Cast {
1677 kind,
1678 expr,
1679 data_type,
1680 format,
1681 } => match kind {
1682 CastKind::Cast => {
1683 if let Some(format) = format {
1684 write!(f, "CAST({expr} AS {data_type} FORMAT {format})")
1685 } else {
1686 write!(f, "CAST({expr} AS {data_type})")
1687 }
1688 }
1689 CastKind::TryCast => {
1690 if let Some(format) = format {
1691 write!(f, "TRY_CAST({expr} AS {data_type} FORMAT {format})")
1692 } else {
1693 write!(f, "TRY_CAST({expr} AS {data_type})")
1694 }
1695 }
1696 CastKind::SafeCast => {
1697 if let Some(format) = format {
1698 write!(f, "SAFE_CAST({expr} AS {data_type} FORMAT {format})")
1699 } else {
1700 write!(f, "SAFE_CAST({expr} AS {data_type})")
1701 }
1702 }
1703 CastKind::DoubleColon => {
1704 write!(f, "{expr}::{data_type}")
1705 }
1706 },
1707 Expr::Extract {
1708 field,
1709 syntax,
1710 expr,
1711 } => match syntax {
1712 ExtractSyntax::From => write!(f, "EXTRACT({field} FROM {expr})"),
1713 ExtractSyntax::Comma => write!(f, "EXTRACT({field}, {expr})"),
1714 },
1715 Expr::Ceil { expr, field } => match field {
1716 CeilFloorKind::DateTimeField(DateTimeField::NoDateTime) => {
1717 write!(f, "CEIL({expr})")
1718 }
1719 CeilFloorKind::DateTimeField(dt_field) => write!(f, "CEIL({expr} TO {dt_field})"),
1720 CeilFloorKind::Scale(s) => write!(f, "CEIL({expr}, {s})"),
1721 },
1722 Expr::Floor { expr, field } => match field {
1723 CeilFloorKind::DateTimeField(DateTimeField::NoDateTime) => {
1724 write!(f, "FLOOR({expr})")
1725 }
1726 CeilFloorKind::DateTimeField(dt_field) => write!(f, "FLOOR({expr} TO {dt_field})"),
1727 CeilFloorKind::Scale(s) => write!(f, "FLOOR({expr}, {s})"),
1728 },
1729 Expr::Position { expr, r#in } => write!(f, "POSITION({expr} IN {in})"),
1730 Expr::Collate { expr, collation } => write!(f, "{expr} COLLATE {collation}"),
1731 Expr::Nested(ast) => write!(f, "({ast})"),
1732 Expr::Value(v) => write!(f, "{v}"),
1733 Expr::Prefixed { prefix, value } => write!(f, "{prefix} {value}"),
1734 Expr::TypedString(ts) => ts.fmt(f),
1735 Expr::Function(fun) => fun.fmt(f),
1736 Expr::Case {
1737 case_token: _,
1738 end_token: _,
1739 operand,
1740 conditions,
1741 else_result,
1742 } => {
1743 f.write_str("CASE")?;
1744 if let Some(operand) = operand {
1745 f.write_str(" ")?;
1746 operand.fmt(f)?;
1747 }
1748 for when in conditions {
1749 SpaceOrNewline.fmt(f)?;
1750 Indent(when).fmt(f)?;
1751 }
1752 if let Some(else_result) = else_result {
1753 SpaceOrNewline.fmt(f)?;
1754 Indent("ELSE").fmt(f)?;
1755 SpaceOrNewline.fmt(f)?;
1756 Indent(Indent(else_result)).fmt(f)?;
1757 }
1758 SpaceOrNewline.fmt(f)?;
1759 f.write_str("END")
1760 }
1761 Expr::Exists { subquery, negated } => write!(
1762 f,
1763 "{}EXISTS ({})",
1764 if *negated { "NOT " } else { "" },
1765 subquery
1766 ),
1767 Expr::Subquery(s) => write!(f, "({s})"),
1768 Expr::GroupingSets(sets) => {
1769 write!(f, "GROUPING SETS (")?;
1770 let mut sep = "";
1771 for set in sets {
1772 write!(f, "{sep}")?;
1773 sep = ", ";
1774 write!(f, "({})", display_comma_separated(set))?;
1775 }
1776 write!(f, ")")
1777 }
1778 Expr::Cube(sets) => {
1779 write!(f, "CUBE (")?;
1780 let mut sep = "";
1781 for set in sets {
1782 write!(f, "{sep}")?;
1783 sep = ", ";
1784 if set.len() == 1 {
1785 write!(f, "{}", set[0])?;
1786 } else {
1787 write!(f, "({})", display_comma_separated(set))?;
1788 }
1789 }
1790 write!(f, ")")
1791 }
1792 Expr::Rollup(sets) => {
1793 write!(f, "ROLLUP (")?;
1794 let mut sep = "";
1795 for set in sets {
1796 write!(f, "{sep}")?;
1797 sep = ", ";
1798 if set.len() == 1 {
1799 write!(f, "{}", set[0])?;
1800 } else {
1801 write!(f, "({})", display_comma_separated(set))?;
1802 }
1803 }
1804 write!(f, ")")
1805 }
1806 Expr::Substring {
1807 expr,
1808 substring_from,
1809 substring_for,
1810 special,
1811 shorthand,
1812 } => {
1813 f.write_str("SUBSTR")?;
1814 if !*shorthand {
1815 f.write_str("ING")?;
1816 }
1817 write!(f, "({expr}")?;
1818 if let Some(from_part) = substring_from {
1819 if *special {
1820 write!(f, ", {from_part}")?;
1821 } else {
1822 write!(f, " FROM {from_part}")?;
1823 }
1824 }
1825 if let Some(for_part) = substring_for {
1826 if *special {
1827 write!(f, ", {for_part}")?;
1828 } else {
1829 write!(f, " FOR {for_part}")?;
1830 }
1831 }
1832
1833 write!(f, ")")
1834 }
1835 Expr::Overlay {
1836 expr,
1837 overlay_what,
1838 overlay_from,
1839 overlay_for,
1840 } => {
1841 write!(
1842 f,
1843 "OVERLAY({expr} PLACING {overlay_what} FROM {overlay_from}"
1844 )?;
1845 if let Some(for_part) = overlay_for {
1846 write!(f, " FOR {for_part}")?;
1847 }
1848
1849 write!(f, ")")
1850 }
1851 Expr::IsDistinctFrom(a, b) => write!(f, "{a} IS DISTINCT FROM {b}"),
1852 Expr::IsNotDistinctFrom(a, b) => write!(f, "{a} IS NOT DISTINCT FROM {b}"),
1853 Expr::Trim {
1854 expr,
1855 trim_where,
1856 trim_what,
1857 trim_characters,
1858 } => {
1859 write!(f, "TRIM(")?;
1860 if let Some(ident) = trim_where {
1861 write!(f, "{ident} ")?;
1862 }
1863 if let Some(trim_char) = trim_what {
1864 write!(f, "{trim_char} FROM {expr}")?;
1865 } else {
1866 write!(f, "{expr}")?;
1867 }
1868 if let Some(characters) = trim_characters {
1869 write!(f, ", {}", display_comma_separated(characters))?;
1870 }
1871
1872 write!(f, ")")
1873 }
1874 Expr::Tuple(exprs) => {
1875 write!(f, "({})", display_comma_separated(exprs))
1876 }
1877 Expr::Struct { values, fields } => {
1878 if !fields.is_empty() {
1879 write!(
1880 f,
1881 "STRUCT<{}>({})",
1882 display_comma_separated(fields),
1883 display_comma_separated(values)
1884 )
1885 } else {
1886 write!(f, "STRUCT({})", display_comma_separated(values))
1887 }
1888 }
1889 Expr::Named { expr, name } => {
1890 write!(f, "{expr} AS {name}")
1891 }
1892 Expr::Dictionary(fields) => {
1893 write!(f, "{{{}}}", display_comma_separated(fields))
1894 }
1895 Expr::Map(map) => {
1896 write!(f, "{map}")
1897 }
1898 Expr::Array(set) => {
1899 write!(f, "{set}")
1900 }
1901 Expr::JsonAccess { value, path } => {
1902 write!(f, "{value}{path}")
1903 }
1904 Expr::AtTimeZone {
1905 timestamp,
1906 time_zone,
1907 } => {
1908 write!(f, "{timestamp} AT TIME ZONE {time_zone}")
1909 }
1910 Expr::Interval(interval) => {
1911 write!(f, "{interval}")
1912 }
1913 Expr::MatchAgainst {
1914 columns,
1915 match_value: match_expr,
1916 opt_search_modifier,
1917 } => {
1918 write!(f, "MATCH ({}) AGAINST ", display_comma_separated(columns),)?;
1919
1920 if let Some(search_modifier) = opt_search_modifier {
1921 write!(f, "({match_expr} {search_modifier})")?;
1922 } else {
1923 write!(f, "({match_expr})")?;
1924 }
1925
1926 Ok(())
1927 }
1928 Expr::OuterJoin(expr) => {
1929 write!(f, "{expr} (+)")
1930 }
1931 Expr::Prior(expr) => write!(f, "PRIOR {expr}"),
1932 Expr::Lambda(lambda) => write!(f, "{lambda}"),
1933 Expr::MemberOf(member_of) => write!(f, "{member_of}"),
1934 }
1935 }
1936}
1937
1938#[derive(#[automatically_derived]
impl ::core::fmt::Debug for WindowType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
WindowType::WindowSpec(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"WindowSpec", &__self_0),
WindowType::NamedWindow(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"NamedWindow", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for WindowType {
#[inline]
fn clone(&self) -> WindowType {
match self {
WindowType::WindowSpec(__self_0) =>
WindowType::WindowSpec(::core::clone::Clone::clone(__self_0)),
WindowType::NamedWindow(__self_0) =>
WindowType::NamedWindow(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for WindowType {
#[inline]
fn eq(&self, other: &WindowType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(WindowType::WindowSpec(__self_0),
WindowType::WindowSpec(__arg1_0)) => __self_0 == __arg1_0,
(WindowType::NamedWindow(__self_0),
WindowType::NamedWindow(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WindowType {
#[inline]
fn partial_cmp(&self, other: &WindowType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(WindowType::WindowSpec(__self_0),
WindowType::WindowSpec(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(WindowType::NamedWindow(__self_0),
WindowType::NamedWindow(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for WindowType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<WindowSpec>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for WindowType {
#[inline]
fn cmp(&self, other: &WindowType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(WindowType::WindowSpec(__self_0),
WindowType::WindowSpec(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(WindowType::NamedWindow(__self_0),
WindowType::NamedWindow(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WindowType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
WindowType::WindowSpec(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
WindowType::NamedWindow(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
1939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1940#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for WindowType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::WindowSpec(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::NamedWindow(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for WindowType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::WindowSpec(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::NamedWindow(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
1941pub enum WindowType {
1942 WindowSpec(WindowSpec),
1943 NamedWindow(Ident),
1944}
1945
1946impl Display for WindowType {
1947 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1948 match self {
1949 WindowType::WindowSpec(spec) => {
1950 f.write_str("(")?;
1951 NewLine.fmt(f)?;
1952 Indent(spec).fmt(f)?;
1953 NewLine.fmt(f)?;
1954 f.write_str(")")
1955 }
1956 WindowType::NamedWindow(name) => name.fmt(f),
1957 }
1958 }
1959}
1960
1961#[derive(#[automatically_derived]
impl ::core::fmt::Debug for WindowSpec {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f, "WindowSpec",
"window_name", &self.window_name, "partition_by",
&self.partition_by, "order_by", &self.order_by, "window_frame",
&&self.window_frame)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for WindowSpec {
#[inline]
fn clone(&self) -> WindowSpec {
WindowSpec {
window_name: ::core::clone::Clone::clone(&self.window_name),
partition_by: ::core::clone::Clone::clone(&self.partition_by),
order_by: ::core::clone::Clone::clone(&self.order_by),
window_frame: ::core::clone::Clone::clone(&self.window_frame),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for WindowSpec {
#[inline]
fn eq(&self, other: &WindowSpec) -> bool {
self.window_name == other.window_name &&
self.partition_by == other.partition_by &&
self.order_by == other.order_by &&
self.window_frame == other.window_frame
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WindowSpec {
#[inline]
fn partial_cmp(&self, other: &WindowSpec)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.window_name,
&other.window_name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.partition_by,
&other.partition_by) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.order_by,
&other.order_by) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.window_frame,
&other.window_frame),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for WindowSpec {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<OrderByExpr>>;
let _: ::core::cmp::AssertParamIsEq<Option<WindowFrame>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for WindowSpec {
#[inline]
fn cmp(&self, other: &WindowSpec) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.window_name, &other.window_name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.partition_by,
&other.partition_by) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.order_by, &other.order_by)
{
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.window_frame,
&other.window_frame),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WindowSpec {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.window_name, state);
::core::hash::Hash::hash(&self.partition_by, state);
::core::hash::Hash::hash(&self.order_by, state);
::core::hash::Hash::hash(&self.window_frame, state)
}
}Hash)]
1963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1964#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for WindowSpec {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.window_name, visitor)?;
sqlparser::ast::Visit::visit(&self.partition_by, visitor)?;
sqlparser::ast::Visit::visit(&self.order_by, visitor)?;
sqlparser::ast::Visit::visit(&self.window_frame, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for WindowSpec {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.window_name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.partition_by, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.order_by, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.window_frame, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
1965pub struct WindowSpec {
1966 pub window_name: Option<Ident>,
1974 pub partition_by: Vec<Expr>,
1976 pub order_by: Vec<OrderByExpr>,
1978 pub window_frame: Option<WindowFrame>,
1980}
1981
1982impl fmt::Display for WindowSpec {
1983 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1984 let mut is_first = true;
1985 if let Some(window_name) = &self.window_name {
1986 if !is_first {
1987 SpaceOrNewline.fmt(f)?;
1988 }
1989 is_first = false;
1990 f.write_fmt(format_args!("{0}", window_name))write!(f, "{window_name}")?;
1991 }
1992 if !self.partition_by.is_empty() {
1993 if !is_first {
1994 SpaceOrNewline.fmt(f)?;
1995 }
1996 is_first = false;
1997 f.write_fmt(format_args!("PARTITION BY {0}",
display_comma_separated(&self.partition_by)))write!(
1998 f,
1999 "PARTITION BY {}",
2000 display_comma_separated(&self.partition_by)
2001 )?;
2002 }
2003 if !self.order_by.is_empty() {
2004 if !is_first {
2005 SpaceOrNewline.fmt(f)?;
2006 }
2007 is_first = false;
2008 f.write_fmt(format_args!("ORDER BY {0}",
display_comma_separated(&self.order_by)))write!(f, "ORDER BY {}", display_comma_separated(&self.order_by))?;
2009 }
2010 if let Some(window_frame) = &self.window_frame {
2011 if !is_first {
2012 SpaceOrNewline.fmt(f)?;
2013 }
2014 if let Some(end_bound) = &window_frame.end_bound {
2015 f.write_fmt(format_args!("{0} BETWEEN {1} AND {2}", window_frame.units,
window_frame.start_bound, end_bound))write!(
2016 f,
2017 "{} BETWEEN {} AND {}",
2018 window_frame.units, window_frame.start_bound, end_bound
2019 )?;
2020 } else {
2021 f.write_fmt(format_args!("{0} {1}", window_frame.units,
window_frame.start_bound))write!(f, "{} {}", window_frame.units, window_frame.start_bound)?;
2022 }
2023 }
2024 Ok(())
2025 }
2026}
2027
2028#[derive(#[automatically_derived]
impl ::core::fmt::Debug for WindowFrame {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "WindowFrame",
"units", &self.units, "start_bound", &self.start_bound,
"end_bound", &&self.end_bound)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for WindowFrame {
#[inline]
fn clone(&self) -> WindowFrame {
WindowFrame {
units: ::core::clone::Clone::clone(&self.units),
start_bound: ::core::clone::Clone::clone(&self.start_bound),
end_bound: ::core::clone::Clone::clone(&self.end_bound),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for WindowFrame {
#[inline]
fn eq(&self, other: &WindowFrame) -> bool {
self.units == other.units && self.start_bound == other.start_bound &&
self.end_bound == other.end_bound
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WindowFrame {
#[inline]
fn partial_cmp(&self, other: &WindowFrame)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.units, &other.units)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.start_bound,
&other.start_bound) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.end_bound,
&other.end_bound),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for WindowFrame {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<WindowFrameUnits>;
let _: ::core::cmp::AssertParamIsEq<WindowFrameBound>;
let _: ::core::cmp::AssertParamIsEq<Option<WindowFrameBound>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for WindowFrame {
#[inline]
fn cmp(&self, other: &WindowFrame) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.units, &other.units) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.start_bound,
&other.start_bound) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.end_bound, &other.end_bound),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WindowFrame {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.units, state);
::core::hash::Hash::hash(&self.start_bound, state);
::core::hash::Hash::hash(&self.end_bound, state)
}
}Hash)]
2034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2035#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for WindowFrame {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.units, visitor)?;
sqlparser::ast::Visit::visit(&self.start_bound, visitor)?;
sqlparser::ast::Visit::visit(&self.end_bound, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for WindowFrame {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.units, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.start_bound, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.end_bound, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2036pub struct WindowFrame {
2037 pub units: WindowFrameUnits,
2038 pub start_bound: WindowFrameBound,
2039 pub end_bound: Option<WindowFrameBound>,
2043 }
2045
2046impl Default for WindowFrame {
2047 fn default() -> Self {
2051 Self {
2052 units: WindowFrameUnits::Range,
2053 start_bound: WindowFrameBound::Preceding(None),
2054 end_bound: None,
2055 }
2056 }
2057}
2058
2059#[derive(#[automatically_derived]
impl ::core::fmt::Debug for WindowFrameUnits {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
WindowFrameUnits::Rows => "Rows",
WindowFrameUnits::Range => "Range",
WindowFrameUnits::Groups => "Groups",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for WindowFrameUnits { }Copy, #[automatically_derived]
impl ::core::clone::Clone for WindowFrameUnits {
#[inline]
fn clone(&self) -> WindowFrameUnits { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for WindowFrameUnits {
#[inline]
fn eq(&self, other: &WindowFrameUnits) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WindowFrameUnits {
#[inline]
fn partial_cmp(&self, other: &WindowFrameUnits)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for WindowFrameUnits {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for WindowFrameUnits {
#[inline]
fn cmp(&self, other: &WindowFrameUnits) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WindowFrameUnits {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2061#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for WindowFrameUnits {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Rows => {} Self::Range => {} Self::Groups => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for WindowFrameUnits {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Rows => {} Self::Range => {} Self::Groups => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2062pub enum WindowFrameUnits {
2063 Rows,
2064 Range,
2065 Groups,
2066}
2067
2068impl fmt::Display for WindowFrameUnits {
2069 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2070 f.write_str(match self {
2071 WindowFrameUnits::Rows => "ROWS",
2072 WindowFrameUnits::Range => "RANGE",
2073 WindowFrameUnits::Groups => "GROUPS",
2074 })
2075 }
2076}
2077
2078#[derive(#[automatically_derived]
impl ::core::fmt::Debug for NullTreatment {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
NullTreatment::IgnoreNulls => "IgnoreNulls",
NullTreatment::RespectNulls => "RespectNulls",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for NullTreatment { }Copy, #[automatically_derived]
impl ::core::clone::Clone for NullTreatment {
#[inline]
fn clone(&self) -> NullTreatment { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for NullTreatment {
#[inline]
fn eq(&self, other: &NullTreatment) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for NullTreatment {
#[inline]
fn partial_cmp(&self, other: &NullTreatment)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for NullTreatment {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for NullTreatment {
#[inline]
fn cmp(&self, other: &NullTreatment) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for NullTreatment {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2083#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for NullTreatment {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::IgnoreNulls => {} Self::RespectNulls => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for NullTreatment {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::IgnoreNulls => {} Self::RespectNulls => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2084pub enum NullTreatment {
2085 IgnoreNulls,
2086 RespectNulls,
2087}
2088
2089impl fmt::Display for NullTreatment {
2090 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2091 f.write_str(match self {
2092 NullTreatment::IgnoreNulls => "IGNORE NULLS",
2093 NullTreatment::RespectNulls => "RESPECT NULLS",
2094 })
2095 }
2096}
2097
2098#[derive(#[automatically_derived]
impl ::core::fmt::Debug for WindowFrameBound {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
WindowFrameBound::CurrentRow =>
::core::fmt::Formatter::write_str(f, "CurrentRow"),
WindowFrameBound::Preceding(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Preceding", &__self_0),
WindowFrameBound::Following(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Following", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for WindowFrameBound {
#[inline]
fn clone(&self) -> WindowFrameBound {
match self {
WindowFrameBound::CurrentRow => WindowFrameBound::CurrentRow,
WindowFrameBound::Preceding(__self_0) =>
WindowFrameBound::Preceding(::core::clone::Clone::clone(__self_0)),
WindowFrameBound::Following(__self_0) =>
WindowFrameBound::Following(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for WindowFrameBound {
#[inline]
fn eq(&self, other: &WindowFrameBound) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(WindowFrameBound::Preceding(__self_0),
WindowFrameBound::Preceding(__arg1_0)) =>
__self_0 == __arg1_0,
(WindowFrameBound::Following(__self_0),
WindowFrameBound::Following(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WindowFrameBound {
#[inline]
fn partial_cmp(&self, other: &WindowFrameBound)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(WindowFrameBound::Preceding(__self_0),
WindowFrameBound::Preceding(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(WindowFrameBound::Following(__self_0),
WindowFrameBound::Following(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for WindowFrameBound {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for WindowFrameBound {
#[inline]
fn cmp(&self, other: &WindowFrameBound) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(WindowFrameBound::Preceding(__self_0),
WindowFrameBound::Preceding(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(WindowFrameBound::Following(__self_0),
WindowFrameBound::Following(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WindowFrameBound {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
WindowFrameBound::Preceding(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
WindowFrameBound::Following(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
2100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2101#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for WindowFrameBound {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::CurrentRow => {}
Self::Preceding(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Following(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for WindowFrameBound {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::CurrentRow => {}
Self::Preceding(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Following(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2102pub enum WindowFrameBound {
2103 CurrentRow,
2105 Preceding(Option<Box<Expr>>),
2107 Following(Option<Box<Expr>>),
2109}
2110
2111impl fmt::Display for WindowFrameBound {
2112 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2113 match self {
2114 WindowFrameBound::CurrentRow => f.write_str("CURRENT ROW"),
2115 WindowFrameBound::Preceding(None) => f.write_str("UNBOUNDED PRECEDING"),
2116 WindowFrameBound::Following(None) => f.write_str("UNBOUNDED FOLLOWING"),
2117 WindowFrameBound::Preceding(Some(n)) => f.write_fmt(format_args!("{0} PRECEDING", n))write!(f, "{n} PRECEDING"),
2118 WindowFrameBound::Following(Some(n)) => f.write_fmt(format_args!("{0} FOLLOWING", n))write!(f, "{n} FOLLOWING"),
2119 }
2120 }
2121}
2122
2123#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AddDropSync {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
AddDropSync::ADD => "ADD",
AddDropSync::DROP => "DROP",
AddDropSync::SYNC => "SYNC",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for AddDropSync { }Copy, #[automatically_derived]
impl ::core::clone::Clone for AddDropSync {
#[inline]
fn clone(&self) -> AddDropSync { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AddDropSync {
#[inline]
fn eq(&self, other: &AddDropSync) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AddDropSync {
#[inline]
fn partial_cmp(&self, other: &AddDropSync)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AddDropSync {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AddDropSync {
#[inline]
fn cmp(&self, other: &AddDropSync) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AddDropSync {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2125#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AddDropSync {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::ADD => {} Self::DROP => {} Self::SYNC => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for AddDropSync {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::ADD => {} Self::DROP => {} Self::SYNC => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2126pub enum AddDropSync {
2127 ADD,
2128 DROP,
2129 SYNC,
2130}
2131
2132impl fmt::Display for AddDropSync {
2133 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2134 match self {
2135 AddDropSync::SYNC => f.write_str("SYNC PARTITIONS"),
2136 AddDropSync::DROP => f.write_str("DROP PARTITIONS"),
2137 AddDropSync::ADD => f.write_str("ADD PARTITIONS"),
2138 }
2139 }
2140}
2141
2142#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowCreateObject {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ShowCreateObject::Event => "Event",
ShowCreateObject::Function => "Function",
ShowCreateObject::Procedure => "Procedure",
ShowCreateObject::Table => "Table",
ShowCreateObject::Trigger => "Trigger",
ShowCreateObject::View => "View",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for ShowCreateObject { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ShowCreateObject {
#[inline]
fn clone(&self) -> ShowCreateObject { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowCreateObject {
#[inline]
fn eq(&self, other: &ShowCreateObject) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowCreateObject {
#[inline]
fn partial_cmp(&self, other: &ShowCreateObject)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowCreateObject {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowCreateObject {
#[inline]
fn cmp(&self, other: &ShowCreateObject) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowCreateObject {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2144#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowCreateObject {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Event => {}
Self::Function => {}
Self::Procedure => {}
Self::Table => {}
Self::Trigger => {}
Self::View => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowCreateObject {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Event => {}
Self::Function => {}
Self::Procedure => {}
Self::Table => {}
Self::Trigger => {}
Self::View => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2145pub enum ShowCreateObject {
2146 Event,
2147 Function,
2148 Procedure,
2149 Table,
2150 Trigger,
2151 View,
2152}
2153
2154impl fmt::Display for ShowCreateObject {
2155 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2156 match self {
2157 ShowCreateObject::Event => f.write_str("EVENT"),
2158 ShowCreateObject::Function => f.write_str("FUNCTION"),
2159 ShowCreateObject::Procedure => f.write_str("PROCEDURE"),
2160 ShowCreateObject::Table => f.write_str("TABLE"),
2161 ShowCreateObject::Trigger => f.write_str("TRIGGER"),
2162 ShowCreateObject::View => f.write_str("VIEW"),
2163 }
2164 }
2165}
2166
2167#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CommentObject {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CommentObject::Column => "Column",
CommentObject::Table => "Table",
CommentObject::Extension => "Extension",
CommentObject::Schema => "Schema",
CommentObject::Database => "Database",
CommentObject::User => "User",
CommentObject::Role => "Role",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for CommentObject { }Copy, #[automatically_derived]
impl ::core::clone::Clone for CommentObject {
#[inline]
fn clone(&self) -> CommentObject { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CommentObject {
#[inline]
fn eq(&self, other: &CommentObject) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CommentObject {
#[inline]
fn partial_cmp(&self, other: &CommentObject)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CommentObject {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CommentObject {
#[inline]
fn cmp(&self, other: &CommentObject) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CommentObject {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2169#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CommentObject {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Column => {}
Self::Table => {}
Self::Extension => {}
Self::Schema => {}
Self::Database => {}
Self::User => {}
Self::Role => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CommentObject {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Column => {}
Self::Table => {}
Self::Extension => {}
Self::Schema => {}
Self::Database => {}
Self::User => {}
Self::Role => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2170pub enum CommentObject {
2171 Column,
2172 Table,
2173 Extension,
2174 Schema,
2175 Database,
2176 User,
2177 Role,
2178}
2179
2180impl fmt::Display for CommentObject {
2181 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2182 match self {
2183 CommentObject::Column => f.write_str("COLUMN"),
2184 CommentObject::Table => f.write_str("TABLE"),
2185 CommentObject::Extension => f.write_str("EXTENSION"),
2186 CommentObject::Schema => f.write_str("SCHEMA"),
2187 CommentObject::Database => f.write_str("DATABASE"),
2188 CommentObject::User => f.write_str("USER"),
2189 CommentObject::Role => f.write_str("ROLE"),
2190 }
2191 }
2192}
2193
2194#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Password {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Password::Password(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Password", &__self_0),
Password::NullPassword =>
::core::fmt::Formatter::write_str(f, "NullPassword"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Password {
#[inline]
fn clone(&self) -> Password {
match self {
Password::Password(__self_0) =>
Password::Password(::core::clone::Clone::clone(__self_0)),
Password::NullPassword => Password::NullPassword,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Password {
#[inline]
fn eq(&self, other: &Password) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Password::Password(__self_0), Password::Password(__arg1_0))
=> __self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Password {
#[inline]
fn partial_cmp(&self, other: &Password)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(Password::Password(__self_0), Password::Password(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Password {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Password {
#[inline]
fn cmp(&self, other: &Password) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Password::Password(__self_0), Password::Password(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Password {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Password::Password(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
2195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2196#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Password {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Password(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::NullPassword => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Password {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Password(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::NullPassword => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2197pub enum Password {
2198 Password(Expr),
2199 NullPassword,
2200}
2201
2202#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CaseStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field5_finish(f, "CaseStatement",
"case_token", &self.case_token, "match_expr", &self.match_expr,
"when_blocks", &self.when_blocks, "else_block", &self.else_block,
"end_case_token", &&self.end_case_token)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CaseStatement {
#[inline]
fn clone(&self) -> CaseStatement {
CaseStatement {
case_token: ::core::clone::Clone::clone(&self.case_token),
match_expr: ::core::clone::Clone::clone(&self.match_expr),
when_blocks: ::core::clone::Clone::clone(&self.when_blocks),
else_block: ::core::clone::Clone::clone(&self.else_block),
end_case_token: ::core::clone::Clone::clone(&self.end_case_token),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CaseStatement {
#[inline]
fn eq(&self, other: &CaseStatement) -> bool {
self.case_token == other.case_token &&
self.match_expr == other.match_expr &&
self.when_blocks == other.when_blocks &&
self.else_block == other.else_block &&
self.end_case_token == other.end_case_token
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CaseStatement {
#[inline]
fn partial_cmp(&self, other: &CaseStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.case_token,
&other.case_token) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.match_expr,
&other.match_expr) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.when_blocks,
&other.when_blocks) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.else_block,
&other.else_block) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.end_case_token,
&other.end_case_token),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CaseStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<AttachedToken>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ConditionalStatementBlock>>;
let _:
::core::cmp::AssertParamIsEq<Option<ConditionalStatementBlock>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CaseStatement {
#[inline]
fn cmp(&self, other: &CaseStatement) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.case_token, &other.case_token) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.match_expr,
&other.match_expr) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.when_blocks,
&other.when_blocks) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.else_block,
&other.else_block) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.end_case_token,
&other.end_case_token),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CaseStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.case_token, state);
::core::hash::Hash::hash(&self.match_expr, state);
::core::hash::Hash::hash(&self.when_blocks, state);
::core::hash::Hash::hash(&self.else_block, state);
::core::hash::Hash::hash(&self.end_case_token, state)
}
}Hash)]
2219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2220#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CaseStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.case_token, visitor)?;
sqlparser::ast::Visit::visit(&self.match_expr, visitor)?;
sqlparser::ast::Visit::visit(&self.when_blocks, visitor)?;
sqlparser::ast::Visit::visit(&self.else_block, visitor)?;
sqlparser::ast::Visit::visit(&self.end_case_token, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CaseStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.case_token, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.match_expr, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.when_blocks, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.else_block, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.end_case_token, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2221pub struct CaseStatement {
2222 pub case_token: AttachedToken,
2224 pub match_expr: Option<Expr>,
2225 pub when_blocks: Vec<ConditionalStatementBlock>,
2226 pub else_block: Option<ConditionalStatementBlock>,
2227 pub end_case_token: AttachedToken,
2229}
2230
2231impl fmt::Display for CaseStatement {
2232 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2233 let CaseStatement {
2234 case_token: _,
2235 match_expr,
2236 when_blocks,
2237 else_block,
2238 end_case_token: AttachedToken(end),
2239 } = self;
2240
2241 f.write_fmt(format_args!("CASE"))write!(f, "CASE")?;
2242
2243 if let Some(expr) = match_expr {
2244 f.write_fmt(format_args!(" {0}", expr))write!(f, " {expr}")?;
2245 }
2246
2247 if !when_blocks.is_empty() {
2248 f.write_fmt(format_args!(" {0}", display_separated(when_blocks, " ")))write!(f, " {}", display_separated(when_blocks, " "))?;
2249 }
2250
2251 if let Some(else_block) = else_block {
2252 f.write_fmt(format_args!(" {0}", else_block))write!(f, " {else_block}")?;
2253 }
2254
2255 f.write_fmt(format_args!(" END"))write!(f, " END")?;
2256
2257 if let Token::Word(w) = &end.token {
2258 if w.keyword == Keyword::CASE {
2259 f.write_fmt(format_args!(" CASE"))write!(f, " CASE")?;
2260 }
2261 }
2262
2263 Ok(())
2264 }
2265}
2266
2267#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IfStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f, "IfStatement",
"if_block", &self.if_block, "elseif_blocks", &self.elseif_blocks,
"else_block", &self.else_block, "end_token", &&self.end_token)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IfStatement {
#[inline]
fn clone(&self) -> IfStatement {
IfStatement {
if_block: ::core::clone::Clone::clone(&self.if_block),
elseif_blocks: ::core::clone::Clone::clone(&self.elseif_blocks),
else_block: ::core::clone::Clone::clone(&self.else_block),
end_token: ::core::clone::Clone::clone(&self.end_token),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IfStatement {
#[inline]
fn eq(&self, other: &IfStatement) -> bool {
self.if_block == other.if_block &&
self.elseif_blocks == other.elseif_blocks &&
self.else_block == other.else_block &&
self.end_token == other.end_token
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IfStatement {
#[inline]
fn partial_cmp(&self, other: &IfStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.if_block,
&other.if_block) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.elseif_blocks,
&other.elseif_blocks) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.else_block,
&other.else_block) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.end_token,
&other.end_token),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IfStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ConditionalStatementBlock>;
let _: ::core::cmp::AssertParamIsEq<Vec<ConditionalStatementBlock>>;
let _:
::core::cmp::AssertParamIsEq<Option<ConditionalStatementBlock>>;
let _: ::core::cmp::AssertParamIsEq<Option<AttachedToken>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IfStatement {
#[inline]
fn cmp(&self, other: &IfStatement) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.if_block, &other.if_block) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.elseif_blocks,
&other.elseif_blocks) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.else_block,
&other.else_block) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.end_token, &other.end_token),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IfStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.if_block, state);
::core::hash::Hash::hash(&self.elseif_blocks, state);
::core::hash::Hash::hash(&self.else_block, state);
::core::hash::Hash::hash(&self.end_token, state)
}
}Hash)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IfStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.if_block, visitor)?;
sqlparser::ast::Visit::visit(&self.elseif_blocks, visitor)?;
sqlparser::ast::Visit::visit(&self.else_block, visitor)?;
sqlparser::ast::Visit::visit(&self.end_token, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for IfStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.if_block, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.elseif_blocks, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.else_block, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.end_token, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2291pub struct IfStatement {
2292 pub if_block: ConditionalStatementBlock,
2293 pub elseif_blocks: Vec<ConditionalStatementBlock>,
2294 pub else_block: Option<ConditionalStatementBlock>,
2295 pub end_token: Option<AttachedToken>,
2296}
2297
2298impl fmt::Display for IfStatement {
2299 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2300 let IfStatement {
2301 if_block,
2302 elseif_blocks,
2303 else_block,
2304 end_token,
2305 } = self;
2306
2307 f.write_fmt(format_args!("{0}", if_block))write!(f, "{if_block}")?;
2308
2309 for elseif_block in elseif_blocks {
2310 f.write_fmt(format_args!(" {0}", elseif_block))write!(f, " {elseif_block}")?;
2311 }
2312
2313 if let Some(else_block) = else_block {
2314 f.write_fmt(format_args!(" {0}", else_block))write!(f, " {else_block}")?;
2315 }
2316
2317 if let Some(AttachedToken(end_token)) = end_token {
2318 f.write_fmt(format_args!(" END {0}", end_token))write!(f, " END {end_token}")?;
2319 }
2320
2321 Ok(())
2322 }
2323}
2324
2325#[derive(#[automatically_derived]
impl ::core::fmt::Debug for WhileStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"WhileStatement", "while_block", &&self.while_block)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for WhileStatement {
#[inline]
fn clone(&self) -> WhileStatement {
WhileStatement {
while_block: ::core::clone::Clone::clone(&self.while_block),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for WhileStatement {
#[inline]
fn eq(&self, other: &WhileStatement) -> bool {
self.while_block == other.while_block
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for WhileStatement {
#[inline]
fn partial_cmp(&self, other: &WhileStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.while_block,
&other.while_block)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for WhileStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ConditionalStatementBlock>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for WhileStatement {
#[inline]
fn cmp(&self, other: &WhileStatement) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.while_block, &other.while_block)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for WhileStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.while_block, state)
}
}Hash)]
2337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2338#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for WhileStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.while_block, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for WhileStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.while_block, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2339pub struct WhileStatement {
2340 pub while_block: ConditionalStatementBlock,
2341}
2342
2343impl fmt::Display for WhileStatement {
2344 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2345 let WhileStatement { while_block } = self;
2346 f.write_fmt(format_args!("{0}", while_block))write!(f, "{while_block}")?;
2347 Ok(())
2348 }
2349}
2350
2351#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ConditionalStatementBlock {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f,
"ConditionalStatementBlock", "start_token", &self.start_token,
"condition", &self.condition, "then_token", &self.then_token,
"conditional_statements", &&self.conditional_statements)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ConditionalStatementBlock {
#[inline]
fn clone(&self) -> ConditionalStatementBlock {
ConditionalStatementBlock {
start_token: ::core::clone::Clone::clone(&self.start_token),
condition: ::core::clone::Clone::clone(&self.condition),
then_token: ::core::clone::Clone::clone(&self.then_token),
conditional_statements: ::core::clone::Clone::clone(&self.conditional_statements),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ConditionalStatementBlock {
#[inline]
fn eq(&self, other: &ConditionalStatementBlock) -> bool {
self.start_token == other.start_token &&
self.condition == other.condition &&
self.then_token == other.then_token &&
self.conditional_statements == other.conditional_statements
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ConditionalStatementBlock {
#[inline]
fn partial_cmp(&self, other: &ConditionalStatementBlock)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.start_token,
&other.start_token) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.condition,
&other.condition) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.then_token,
&other.then_token) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.conditional_statements,
&other.conditional_statements),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ConditionalStatementBlock {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<AttachedToken>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<AttachedToken>>;
let _: ::core::cmp::AssertParamIsEq<ConditionalStatements>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ConditionalStatementBlock {
#[inline]
fn cmp(&self, other: &ConditionalStatementBlock)
-> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.start_token, &other.start_token) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.condition, &other.condition)
{
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.then_token,
&other.then_token) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.conditional_statements,
&other.conditional_statements),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ConditionalStatementBlock {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.start_token, state);
::core::hash::Hash::hash(&self.condition, state);
::core::hash::Hash::hash(&self.then_token, state);
::core::hash::Hash::hash(&self.conditional_statements, state)
}
}Hash)]
2376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2377#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ConditionalStatementBlock {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.start_token, visitor)?;
sqlparser::ast::Visit::visit(&self.condition, visitor)?;
sqlparser::ast::Visit::visit(&self.then_token, visitor)?;
sqlparser::ast::Visit::visit(&self.conditional_statements, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ConditionalStatementBlock {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.start_token, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.condition, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.then_token, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.conditional_statements,
visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2378pub struct ConditionalStatementBlock {
2379 pub start_token: AttachedToken,
2380 pub condition: Option<Expr>,
2381 pub then_token: Option<AttachedToken>,
2382 pub conditional_statements: ConditionalStatements,
2383}
2384
2385impl ConditionalStatementBlock {
2386 pub fn statements(&self) -> &Vec<Statement> {
2387 self.conditional_statements.statements()
2388 }
2389}
2390
2391impl fmt::Display for ConditionalStatementBlock {
2392 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2393 let ConditionalStatementBlock {
2394 start_token: AttachedToken(start_token),
2395 condition,
2396 then_token,
2397 conditional_statements,
2398 } = self;
2399
2400 f.write_fmt(format_args!("{0}", start_token))write!(f, "{start_token}")?;
2401
2402 if let Some(condition) = condition {
2403 f.write_fmt(format_args!(" {0}", condition))write!(f, " {condition}")?;
2404 }
2405
2406 if then_token.is_some() {
2407 f.write_fmt(format_args!(" THEN"))write!(f, " THEN")?;
2408 }
2409
2410 if !conditional_statements.statements().is_empty() {
2411 f.write_fmt(format_args!(" {0}", conditional_statements))write!(f, " {conditional_statements}")?;
2412 }
2413
2414 Ok(())
2415 }
2416}
2417
2418#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ConditionalStatements {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ConditionalStatements::Sequence { statements: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Sequence", "statements", &__self_0),
ConditionalStatements::BeginEnd(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"BeginEnd", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ConditionalStatements {
#[inline]
fn clone(&self) -> ConditionalStatements {
match self {
ConditionalStatements::Sequence { statements: __self_0 } =>
ConditionalStatements::Sequence {
statements: ::core::clone::Clone::clone(__self_0),
},
ConditionalStatements::BeginEnd(__self_0) =>
ConditionalStatements::BeginEnd(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ConditionalStatements {
#[inline]
fn eq(&self, other: &ConditionalStatements) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(ConditionalStatements::Sequence { statements: __self_0 },
ConditionalStatements::Sequence { statements: __arg1_0 }) =>
__self_0 == __arg1_0,
(ConditionalStatements::BeginEnd(__self_0),
ConditionalStatements::BeginEnd(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ConditionalStatements {
#[inline]
fn partial_cmp(&self, other: &ConditionalStatements)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(ConditionalStatements::Sequence { statements: __self_0 },
ConditionalStatements::Sequence { statements: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ConditionalStatements::BeginEnd(__self_0),
ConditionalStatements::BeginEnd(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ConditionalStatements {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Statement>>;
let _: ::core::cmp::AssertParamIsEq<BeginEndStatements>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ConditionalStatements {
#[inline]
fn cmp(&self, other: &ConditionalStatements) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(ConditionalStatements::Sequence { statements: __self_0 },
ConditionalStatements::Sequence { statements: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ConditionalStatements::BeginEnd(__self_0),
ConditionalStatements::BeginEnd(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ConditionalStatements {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
ConditionalStatements::Sequence { statements: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
ConditionalStatements::BeginEnd(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
2420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2421#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ConditionalStatements {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Sequence { statements } => {
sqlparser::ast::Visit::visit(statements, visitor)?;
}
Self::BeginEnd(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ConditionalStatements {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Sequence { statements } => {
sqlparser::ast::VisitMut::visit(statements, visitor)?;
}
Self::BeginEnd(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2422pub enum ConditionalStatements {
2423 Sequence { statements: Vec<Statement> },
2425 BeginEnd(BeginEndStatements),
2427}
2428
2429impl ConditionalStatements {
2430 pub fn statements(&self) -> &Vec<Statement> {
2431 match self {
2432 ConditionalStatements::Sequence { statements } => statements,
2433 ConditionalStatements::BeginEnd(bes) => &bes.statements,
2434 }
2435 }
2436}
2437
2438impl fmt::Display for ConditionalStatements {
2439 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2440 match self {
2441 ConditionalStatements::Sequence { statements } => {
2442 if !statements.is_empty() {
2443 format_statement_list(f, statements)?;
2444 }
2445 Ok(())
2446 }
2447 ConditionalStatements::BeginEnd(bes) => f.write_fmt(format_args!("{0}", bes))write!(f, "{bes}"),
2448 }
2449 }
2450}
2451
2452#[derive(#[automatically_derived]
impl ::core::fmt::Debug for BeginEndStatements {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"BeginEndStatements", "begin_token", &self.begin_token,
"statements", &self.statements, "end_token", &&self.end_token)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for BeginEndStatements {
#[inline]
fn clone(&self) -> BeginEndStatements {
BeginEndStatements {
begin_token: ::core::clone::Clone::clone(&self.begin_token),
statements: ::core::clone::Clone::clone(&self.statements),
end_token: ::core::clone::Clone::clone(&self.end_token),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BeginEndStatements {
#[inline]
fn eq(&self, other: &BeginEndStatements) -> bool {
self.begin_token == other.begin_token &&
self.statements == other.statements &&
self.end_token == other.end_token
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for BeginEndStatements {
#[inline]
fn partial_cmp(&self, other: &BeginEndStatements)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.begin_token,
&other.begin_token) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.statements,
&other.statements) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.end_token,
&other.end_token),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for BeginEndStatements {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<AttachedToken>;
let _: ::core::cmp::AssertParamIsEq<Vec<Statement>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for BeginEndStatements {
#[inline]
fn cmp(&self, other: &BeginEndStatements) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.begin_token, &other.begin_token) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.statements,
&other.statements) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.end_token, &other.end_token),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for BeginEndStatements {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.begin_token, state);
::core::hash::Hash::hash(&self.statements, state);
::core::hash::Hash::hash(&self.end_token, state)
}
}Hash)]
2461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2462#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for BeginEndStatements {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.begin_token, visitor)?;
sqlparser::ast::Visit::visit(&self.statements, visitor)?;
sqlparser::ast::Visit::visit(&self.end_token, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for BeginEndStatements {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.begin_token, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.statements, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.end_token, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2463pub struct BeginEndStatements {
2464 pub begin_token: AttachedToken,
2465 pub statements: Vec<Statement>,
2466 pub end_token: AttachedToken,
2467}
2468
2469impl fmt::Display for BeginEndStatements {
2470 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2471 let BeginEndStatements {
2472 begin_token: AttachedToken(begin_token),
2473 statements,
2474 end_token: AttachedToken(end_token),
2475 } = self;
2476
2477 if begin_token.token != Token::EOF {
2478 f.write_fmt(format_args!("{0} ", begin_token))write!(f, "{begin_token} ")?;
2479 }
2480 if !statements.is_empty() {
2481 format_statement_list(f, statements)?;
2482 }
2483 if end_token.token != Token::EOF {
2484 f.write_fmt(format_args!(" {0}", end_token))write!(f, " {end_token}")?;
2485 }
2486 Ok(())
2487 }
2488}
2489
2490#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RaiseStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"RaiseStatement", "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RaiseStatement {
#[inline]
fn clone(&self) -> RaiseStatement {
RaiseStatement { value: ::core::clone::Clone::clone(&self.value) }
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RaiseStatement {
#[inline]
fn eq(&self, other: &RaiseStatement) -> bool { self.value == other.value }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RaiseStatement {
#[inline]
fn partial_cmp(&self, other: &RaiseStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.value, &other.value)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RaiseStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<RaiseStatementValue>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RaiseStatement {
#[inline]
fn cmp(&self, other: &RaiseStatement) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.value, &other.value)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RaiseStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
2502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2503#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RaiseStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for RaiseStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2504pub struct RaiseStatement {
2505 pub value: Option<RaiseStatementValue>,
2506}
2507
2508impl fmt::Display for RaiseStatement {
2509 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2510 let RaiseStatement { value } = self;
2511
2512 f.write_fmt(format_args!("RAISE"))write!(f, "RAISE")?;
2513 if let Some(value) = value {
2514 f.write_fmt(format_args!(" {0}", value))write!(f, " {value}")?;
2515 }
2516
2517 Ok(())
2518 }
2519}
2520
2521#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RaiseStatementValue {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
RaiseStatementValue::UsingMessage(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"UsingMessage", &__self_0),
RaiseStatementValue::Expr(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RaiseStatementValue {
#[inline]
fn clone(&self) -> RaiseStatementValue {
match self {
RaiseStatementValue::UsingMessage(__self_0) =>
RaiseStatementValue::UsingMessage(::core::clone::Clone::clone(__self_0)),
RaiseStatementValue::Expr(__self_0) =>
RaiseStatementValue::Expr(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RaiseStatementValue {
#[inline]
fn eq(&self, other: &RaiseStatementValue) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(RaiseStatementValue::UsingMessage(__self_0),
RaiseStatementValue::UsingMessage(__arg1_0)) =>
__self_0 == __arg1_0,
(RaiseStatementValue::Expr(__self_0),
RaiseStatementValue::Expr(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RaiseStatementValue {
#[inline]
fn partial_cmp(&self, other: &RaiseStatementValue)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(RaiseStatementValue::UsingMessage(__self_0),
RaiseStatementValue::UsingMessage(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(RaiseStatementValue::Expr(__self_0),
RaiseStatementValue::Expr(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RaiseStatementValue {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RaiseStatementValue {
#[inline]
fn cmp(&self, other: &RaiseStatementValue) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(RaiseStatementValue::UsingMessage(__self_0),
RaiseStatementValue::UsingMessage(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(RaiseStatementValue::Expr(__self_0),
RaiseStatementValue::Expr(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RaiseStatementValue {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
RaiseStatementValue::UsingMessage(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
RaiseStatementValue::Expr(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
2523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2524#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RaiseStatementValue {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::UsingMessage(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Expr(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for RaiseStatementValue {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::UsingMessage(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Expr(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2525pub enum RaiseStatementValue {
2526 UsingMessage(Expr),
2528 Expr(Expr),
2530}
2531
2532impl fmt::Display for RaiseStatementValue {
2533 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2534 match self {
2535 RaiseStatementValue::Expr(expr) => f.write_fmt(format_args!("{0}", expr))write!(f, "{expr}"),
2536 RaiseStatementValue::UsingMessage(expr) => f.write_fmt(format_args!("USING MESSAGE = {0}", expr))write!(f, "USING MESSAGE = {expr}"),
2537 }
2538 }
2539}
2540
2541#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DeclareAssignment {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
DeclareAssignment::Expr(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
&__self_0),
DeclareAssignment::Default(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Default", &__self_0),
DeclareAssignment::DuckAssignment(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DuckAssignment", &__self_0),
DeclareAssignment::For(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "For",
&__self_0),
DeclareAssignment::MsSqlAssignment(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"MsSqlAssignment", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DeclareAssignment {
#[inline]
fn clone(&self) -> DeclareAssignment {
match self {
DeclareAssignment::Expr(__self_0) =>
DeclareAssignment::Expr(::core::clone::Clone::clone(__self_0)),
DeclareAssignment::Default(__self_0) =>
DeclareAssignment::Default(::core::clone::Clone::clone(__self_0)),
DeclareAssignment::DuckAssignment(__self_0) =>
DeclareAssignment::DuckAssignment(::core::clone::Clone::clone(__self_0)),
DeclareAssignment::For(__self_0) =>
DeclareAssignment::For(::core::clone::Clone::clone(__self_0)),
DeclareAssignment::MsSqlAssignment(__self_0) =>
DeclareAssignment::MsSqlAssignment(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DeclareAssignment {
#[inline]
fn eq(&self, other: &DeclareAssignment) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(DeclareAssignment::Expr(__self_0),
DeclareAssignment::Expr(__arg1_0)) => __self_0 == __arg1_0,
(DeclareAssignment::Default(__self_0),
DeclareAssignment::Default(__arg1_0)) =>
__self_0 == __arg1_0,
(DeclareAssignment::DuckAssignment(__self_0),
DeclareAssignment::DuckAssignment(__arg1_0)) =>
__self_0 == __arg1_0,
(DeclareAssignment::For(__self_0),
DeclareAssignment::For(__arg1_0)) => __self_0 == __arg1_0,
(DeclareAssignment::MsSqlAssignment(__self_0),
DeclareAssignment::MsSqlAssignment(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DeclareAssignment {
#[inline]
fn partial_cmp(&self, other: &DeclareAssignment)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(DeclareAssignment::Expr(__self_0),
DeclareAssignment::Expr(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(DeclareAssignment::Default(__self_0),
DeclareAssignment::Default(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(DeclareAssignment::DuckAssignment(__self_0),
DeclareAssignment::DuckAssignment(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(DeclareAssignment::For(__self_0),
DeclareAssignment::For(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(DeclareAssignment::MsSqlAssignment(__self_0),
DeclareAssignment::MsSqlAssignment(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DeclareAssignment {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DeclareAssignment {
#[inline]
fn cmp(&self, other: &DeclareAssignment) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(DeclareAssignment::Expr(__self_0),
DeclareAssignment::Expr(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(DeclareAssignment::Default(__self_0),
DeclareAssignment::Default(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(DeclareAssignment::DuckAssignment(__self_0),
DeclareAssignment::DuckAssignment(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(DeclareAssignment::For(__self_0),
DeclareAssignment::For(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(DeclareAssignment::MsSqlAssignment(__self_0),
DeclareAssignment::MsSqlAssignment(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DeclareAssignment {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
DeclareAssignment::Expr(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
DeclareAssignment::Default(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
DeclareAssignment::DuckAssignment(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
DeclareAssignment::For(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
DeclareAssignment::MsSqlAssignment(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
2549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2550#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DeclareAssignment {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Default(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::DuckAssignment(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::For(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::MsSqlAssignment(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DeclareAssignment {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Default(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::DuckAssignment(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::For(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::MsSqlAssignment(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2551pub enum DeclareAssignment {
2552 Expr(Box<Expr>),
2554
2555 Default(Box<Expr>),
2557
2558 DuckAssignment(Box<Expr>),
2565
2566 For(Box<Expr>),
2573
2574 MsSqlAssignment(Box<Expr>),
2581}
2582
2583impl fmt::Display for DeclareAssignment {
2584 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2585 match self {
2586 DeclareAssignment::Expr(expr) => {
2587 f.write_fmt(format_args!("{0}", expr))write!(f, "{expr}")
2588 }
2589 DeclareAssignment::Default(expr) => {
2590 f.write_fmt(format_args!("DEFAULT {0}", expr))write!(f, "DEFAULT {expr}")
2591 }
2592 DeclareAssignment::DuckAssignment(expr) => {
2593 f.write_fmt(format_args!(":= {0}", expr))write!(f, ":= {expr}")
2594 }
2595 DeclareAssignment::MsSqlAssignment(expr) => {
2596 f.write_fmt(format_args!("= {0}", expr))write!(f, "= {expr}")
2597 }
2598 DeclareAssignment::For(expr) => {
2599 f.write_fmt(format_args!("FOR {0}", expr))write!(f, "FOR {expr}")
2600 }
2601 }
2602 }
2603}
2604
2605#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DeclareType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
DeclareType::Cursor => "Cursor",
DeclareType::ResultSet => "ResultSet",
DeclareType::Exception => "Exception",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DeclareType {
#[inline]
fn clone(&self) -> DeclareType {
match self {
DeclareType::Cursor => DeclareType::Cursor,
DeclareType::ResultSet => DeclareType::ResultSet,
DeclareType::Exception => DeclareType::Exception,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DeclareType {
#[inline]
fn eq(&self, other: &DeclareType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DeclareType {
#[inline]
fn partial_cmp(&self, other: &DeclareType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DeclareType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DeclareType {
#[inline]
fn cmp(&self, other: &DeclareType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DeclareType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2608#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DeclareType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Cursor => {}
Self::ResultSet => {}
Self::Exception => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DeclareType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Cursor => {}
Self::ResultSet => {}
Self::Exception => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2609pub enum DeclareType {
2610 Cursor,
2616
2617 ResultSet,
2625
2626 Exception,
2634}
2635
2636impl fmt::Display for DeclareType {
2637 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2638 match self {
2639 DeclareType::Cursor => {
2640 f.write_fmt(format_args!("CURSOR"))write!(f, "CURSOR")
2641 }
2642 DeclareType::ResultSet => {
2643 f.write_fmt(format_args!("RESULTSET"))write!(f, "RESULTSET")
2644 }
2645 DeclareType::Exception => {
2646 f.write_fmt(format_args!("EXCEPTION"))write!(f, "EXCEPTION")
2647 }
2648 }
2649 }
2650}
2651
2652#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Declare {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
let names: &'static _ =
&["names", "data_type", "assignment", "declare_type", "binary",
"sensitive", "scroll", "hold", "for_query"];
let values: &[&dyn ::core::fmt::Debug] =
&[&self.names, &self.data_type, &self.assignment,
&self.declare_type, &self.binary, &self.sensitive,
&self.scroll, &self.hold, &&self.for_query];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Declare",
names, values)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Declare {
#[inline]
fn clone(&self) -> Declare {
Declare {
names: ::core::clone::Clone::clone(&self.names),
data_type: ::core::clone::Clone::clone(&self.data_type),
assignment: ::core::clone::Clone::clone(&self.assignment),
declare_type: ::core::clone::Clone::clone(&self.declare_type),
binary: ::core::clone::Clone::clone(&self.binary),
sensitive: ::core::clone::Clone::clone(&self.sensitive),
scroll: ::core::clone::Clone::clone(&self.scroll),
hold: ::core::clone::Clone::clone(&self.hold),
for_query: ::core::clone::Clone::clone(&self.for_query),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Declare {
#[inline]
fn eq(&self, other: &Declare) -> bool {
self.names == other.names && self.data_type == other.data_type &&
self.assignment == other.assignment &&
self.declare_type == other.declare_type &&
self.binary == other.binary &&
self.sensitive == other.sensitive &&
self.scroll == other.scroll && self.hold == other.hold &&
self.for_query == other.for_query
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Declare {
#[inline]
fn partial_cmp(&self, other: &Declare)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.names, &other.names)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
&other.data_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.assignment,
&other.assignment) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.declare_type,
&other.declare_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.binary,
&other.binary) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.sensitive,
&other.sensitive) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.scroll,
&other.scroll) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.hold,
&other.hold) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.for_query,
&other.for_query),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Declare {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
let _: ::core::cmp::AssertParamIsEq<Option<DeclareAssignment>>;
let _: ::core::cmp::AssertParamIsEq<Option<DeclareType>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Query>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Declare {
#[inline]
fn cmp(&self, other: &Declare) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.names, &other.names) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
{
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.assignment,
&other.assignment) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.declare_type,
&other.declare_type) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.binary, &other.binary) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.sensitive,
&other.sensitive) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.scroll, &other.scroll) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.hold, &other.hold) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.for_query, &other.for_query),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Declare {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.names, state);
::core::hash::Hash::hash(&self.data_type, state);
::core::hash::Hash::hash(&self.assignment, state);
::core::hash::Hash::hash(&self.declare_type, state);
::core::hash::Hash::hash(&self.binary, state);
::core::hash::Hash::hash(&self.sensitive, state);
::core::hash::Hash::hash(&self.scroll, state);
::core::hash::Hash::hash(&self.hold, state);
::core::hash::Hash::hash(&self.for_query, state)
}
}Hash)]
2665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2666#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Declare {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.names, visitor)?;
sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
sqlparser::ast::Visit::visit(&self.assignment, visitor)?;
sqlparser::ast::Visit::visit(&self.declare_type, visitor)?;
sqlparser::ast::Visit::visit(&self.binary, visitor)?;
sqlparser::ast::Visit::visit(&self.sensitive, visitor)?;
sqlparser::ast::Visit::visit(&self.scroll, visitor)?;
sqlparser::ast::Visit::visit(&self.hold, visitor)?;
sqlparser::ast::Visit::visit(&self.for_query, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Declare {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.names, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.data_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.assignment, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.declare_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.binary, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.sensitive, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.scroll, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.hold, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.for_query, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2667pub struct Declare {
2668 pub names: Vec<Ident>,
2671 pub data_type: Option<DataType>,
2674 pub assignment: Option<DeclareAssignment>,
2676 pub declare_type: Option<DeclareType>,
2678 pub binary: Option<bool>,
2680 pub sensitive: Option<bool>,
2684 pub scroll: Option<bool>,
2688 pub hold: Option<bool>,
2692 pub for_query: Option<Box<Query>>,
2694}
2695
2696impl fmt::Display for Declare {
2697 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2698 let Declare {
2699 names,
2700 data_type,
2701 assignment,
2702 declare_type,
2703 binary,
2704 sensitive,
2705 scroll,
2706 hold,
2707 for_query,
2708 } = self;
2709 f.write_fmt(format_args!("{0}", display_comma_separated(names)))write!(f, "{}", display_comma_separated(names))?;
2710
2711 if let Some(true) = binary {
2712 f.write_fmt(format_args!(" BINARY"))write!(f, " BINARY")?;
2713 }
2714
2715 if let Some(sensitive) = sensitive {
2716 if *sensitive {
2717 f.write_fmt(format_args!(" INSENSITIVE"))write!(f, " INSENSITIVE")?;
2718 } else {
2719 f.write_fmt(format_args!(" ASENSITIVE"))write!(f, " ASENSITIVE")?;
2720 }
2721 }
2722
2723 if let Some(scroll) = scroll {
2724 if *scroll {
2725 f.write_fmt(format_args!(" SCROLL"))write!(f, " SCROLL")?;
2726 } else {
2727 f.write_fmt(format_args!(" NO SCROLL"))write!(f, " NO SCROLL")?;
2728 }
2729 }
2730
2731 if let Some(declare_type) = declare_type {
2732 f.write_fmt(format_args!(" {0}", declare_type))write!(f, " {declare_type}")?;
2733 }
2734
2735 if let Some(hold) = hold {
2736 if *hold {
2737 f.write_fmt(format_args!(" WITH HOLD"))write!(f, " WITH HOLD")?;
2738 } else {
2739 f.write_fmt(format_args!(" WITHOUT HOLD"))write!(f, " WITHOUT HOLD")?;
2740 }
2741 }
2742
2743 if let Some(query) = for_query {
2744 f.write_fmt(format_args!(" FOR {0}", query))write!(f, " FOR {query}")?;
2745 }
2746
2747 if let Some(data_type) = data_type {
2748 f.write_fmt(format_args!(" {0}", data_type))write!(f, " {data_type}")?;
2749 }
2750
2751 if let Some(expr) = assignment {
2752 f.write_fmt(format_args!(" {0}", expr))write!(f, " {expr}")?;
2753 }
2754 Ok(())
2755 }
2756}
2757
2758#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateTableOptions {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CreateTableOptions::None =>
::core::fmt::Formatter::write_str(f, "None"),
CreateTableOptions::With(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "With",
&__self_0),
CreateTableOptions::Options(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Options", &__self_0),
CreateTableOptions::Plain(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Plain",
&__self_0),
CreateTableOptions::TableProperties(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"TableProperties", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateTableOptions {
#[inline]
fn clone(&self) -> CreateTableOptions {
match self {
CreateTableOptions::None => CreateTableOptions::None,
CreateTableOptions::With(__self_0) =>
CreateTableOptions::With(::core::clone::Clone::clone(__self_0)),
CreateTableOptions::Options(__self_0) =>
CreateTableOptions::Options(::core::clone::Clone::clone(__self_0)),
CreateTableOptions::Plain(__self_0) =>
CreateTableOptions::Plain(::core::clone::Clone::clone(__self_0)),
CreateTableOptions::TableProperties(__self_0) =>
CreateTableOptions::TableProperties(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateTableOptions {
#[inline]
fn eq(&self, other: &CreateTableOptions) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CreateTableOptions::With(__self_0),
CreateTableOptions::With(__arg1_0)) => __self_0 == __arg1_0,
(CreateTableOptions::Options(__self_0),
CreateTableOptions::Options(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateTableOptions::Plain(__self_0),
CreateTableOptions::Plain(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateTableOptions::TableProperties(__self_0),
CreateTableOptions::TableProperties(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateTableOptions {
#[inline]
fn partial_cmp(&self, other: &CreateTableOptions)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CreateTableOptions::With(__self_0),
CreateTableOptions::With(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateTableOptions::Options(__self_0),
CreateTableOptions::Options(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateTableOptions::Plain(__self_0),
CreateTableOptions::Plain(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateTableOptions::TableProperties(__self_0),
CreateTableOptions::TableProperties(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateTableOptions {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateTableOptions {
#[inline]
fn cmp(&self, other: &CreateTableOptions) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CreateTableOptions::With(__self_0),
CreateTableOptions::With(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateTableOptions::Options(__self_0),
CreateTableOptions::Options(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateTableOptions::Plain(__self_0),
CreateTableOptions::Plain(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateTableOptions::TableProperties(__self_0),
CreateTableOptions::TableProperties(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateTableOptions {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CreateTableOptions::With(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateTableOptions::Options(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateTableOptions::Plain(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateTableOptions::TableProperties(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
2760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2761#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateTableOptions {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::None => {}
Self::With(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Options(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Plain(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::TableProperties(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateTableOptions {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::None => {}
Self::With(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Options(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Plain(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::TableProperties(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2762pub enum CreateTableOptions {
2763 None,
2764 With(Vec<SqlOption>),
2778 Options(Vec<SqlOption>),
2783
2784 Plain(Vec<SqlOption>),
2787
2788 TableProperties(Vec<SqlOption>),
2789}
2790
2791impl Default for CreateTableOptions {
2792 fn default() -> Self {
2793 Self::None
2794 }
2795}
2796
2797impl fmt::Display for CreateTableOptions {
2798 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2799 match self {
2800 CreateTableOptions::With(with_options) => {
2801 f.write_fmt(format_args!("WITH ({0})", display_comma_separated(with_options)))write!(f, "WITH ({})", display_comma_separated(with_options))
2802 }
2803 CreateTableOptions::Options(options) => {
2804 f.write_fmt(format_args!("OPTIONS({0})", display_comma_separated(options)))write!(f, "OPTIONS({})", display_comma_separated(options))
2805 }
2806 CreateTableOptions::TableProperties(options) => {
2807 f.write_fmt(format_args!("TBLPROPERTIES ({0})",
display_comma_separated(options)))write!(f, "TBLPROPERTIES ({})", display_comma_separated(options))
2808 }
2809 CreateTableOptions::Plain(options) => {
2810 f.write_fmt(format_args!("{0}", display_separated(options, " ")))write!(f, "{}", display_separated(options, " "))
2811 }
2812 CreateTableOptions::None => Ok(()),
2813 }
2814 }
2815}
2816
2817#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FromTable {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
FromTable::WithFromKeyword(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"WithFromKeyword", &__self_0),
FromTable::WithoutKeyword(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"WithoutKeyword", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FromTable {
#[inline]
fn clone(&self) -> FromTable {
match self {
FromTable::WithFromKeyword(__self_0) =>
FromTable::WithFromKeyword(::core::clone::Clone::clone(__self_0)),
FromTable::WithoutKeyword(__self_0) =>
FromTable::WithoutKeyword(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FromTable {
#[inline]
fn eq(&self, other: &FromTable) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(FromTable::WithFromKeyword(__self_0),
FromTable::WithFromKeyword(__arg1_0)) =>
__self_0 == __arg1_0,
(FromTable::WithoutKeyword(__self_0),
FromTable::WithoutKeyword(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FromTable {
#[inline]
fn partial_cmp(&self, other: &FromTable)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(FromTable::WithFromKeyword(__self_0),
FromTable::WithFromKeyword(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FromTable::WithoutKeyword(__self_0),
FromTable::WithoutKeyword(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FromTable {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<TableWithJoins>>;
let _: ::core::cmp::AssertParamIsEq<Vec<TableWithJoins>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FromTable {
#[inline]
fn cmp(&self, other: &FromTable) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(FromTable::WithFromKeyword(__self_0),
FromTable::WithFromKeyword(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FromTable::WithoutKeyword(__self_0),
FromTable::WithoutKeyword(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FromTable {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
FromTable::WithFromKeyword(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FromTable::WithoutKeyword(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
2824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2825#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FromTable {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::WithFromKeyword(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::WithoutKeyword(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FromTable {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::WithFromKeyword(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::WithoutKeyword(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2826pub enum FromTable {
2827 WithFromKeyword(Vec<TableWithJoins>),
2829 WithoutKeyword(Vec<TableWithJoins>),
2832}
2833impl Display for FromTable {
2834 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2835 match self {
2836 FromTable::WithFromKeyword(tables) => {
2837 f.write_fmt(format_args!("FROM {0}", display_comma_separated(tables)))write!(f, "FROM {}", display_comma_separated(tables))
2838 }
2839 FromTable::WithoutKeyword(tables) => {
2840 f.write_fmt(format_args!("{0}", display_comma_separated(tables)))write!(f, "{}", display_comma_separated(tables))
2841 }
2842 }
2843 }
2844}
2845
2846#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreatePolicyType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CreatePolicyType::Permissive => "Permissive",
CreatePolicyType::Restrictive => "Restrictive",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreatePolicyType {
#[inline]
fn clone(&self) -> CreatePolicyType {
match self {
CreatePolicyType::Permissive => CreatePolicyType::Permissive,
CreatePolicyType::Restrictive => CreatePolicyType::Restrictive,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreatePolicyType {
#[inline]
fn eq(&self, other: &CreatePolicyType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreatePolicyType {
#[inline]
fn partial_cmp(&self, other: &CreatePolicyType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreatePolicyType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreatePolicyType {
#[inline]
fn cmp(&self, other: &CreatePolicyType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreatePolicyType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2853#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreatePolicyType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Permissive => {} Self::Restrictive => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreatePolicyType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Permissive => {} Self::Restrictive => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2854pub enum CreatePolicyType {
2855 Permissive,
2856 Restrictive,
2857}
2858
2859#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreatePolicyCommand {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CreatePolicyCommand::All => "All",
CreatePolicyCommand::Select => "Select",
CreatePolicyCommand::Insert => "Insert",
CreatePolicyCommand::Update => "Update",
CreatePolicyCommand::Delete => "Delete",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreatePolicyCommand {
#[inline]
fn clone(&self) -> CreatePolicyCommand {
match self {
CreatePolicyCommand::All => CreatePolicyCommand::All,
CreatePolicyCommand::Select => CreatePolicyCommand::Select,
CreatePolicyCommand::Insert => CreatePolicyCommand::Insert,
CreatePolicyCommand::Update => CreatePolicyCommand::Update,
CreatePolicyCommand::Delete => CreatePolicyCommand::Delete,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreatePolicyCommand {
#[inline]
fn eq(&self, other: &CreatePolicyCommand) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreatePolicyCommand {
#[inline]
fn partial_cmp(&self, other: &CreatePolicyCommand)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreatePolicyCommand {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreatePolicyCommand {
#[inline]
fn cmp(&self, other: &CreatePolicyCommand) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreatePolicyCommand {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
2865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2866#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreatePolicyCommand {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::All => {}
Self::Select => {}
Self::Insert => {}
Self::Update => {}
Self::Delete => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreatePolicyCommand {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::All => {}
Self::Select => {}
Self::Insert => {}
Self::Update => {}
Self::Delete => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2867pub enum CreatePolicyCommand {
2868 All,
2869 Select,
2870 Insert,
2871 Update,
2872 Delete,
2873}
2874
2875#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Set {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Set::SingleAssignment {
scope: __self_0,
hivevar: __self_1,
variable: __self_2,
values: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"SingleAssignment", "scope", __self_0, "hivevar", __self_1,
"variable", __self_2, "values", &__self_3),
Set::ParenthesizedAssignments {
variables: __self_0, values: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"ParenthesizedAssignments", "variables", __self_0, "values",
&__self_1),
Set::MultipleAssignments { assignments: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"MultipleAssignments", "assignments", &__self_0),
Set::SetSessionParam(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"SetSessionParam", &__self_0),
Set::SetRole { context_modifier: __self_0, role_name: __self_1 }
=>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetRole", "context_modifier", __self_0, "role_name",
&__self_1),
Set::SetTimeZone { local: __self_0, value: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetTimeZone", "local", __self_0, "value", &__self_1),
Set::SetNames { charset_name: __self_0, collation_name: __self_1 }
=>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetNames", "charset_name", __self_0, "collation_name",
&__self_1),
Set::SetNamesDefault {} =>
::core::fmt::Formatter::write_str(f, "SetNamesDefault"),
Set::SetTransaction {
modes: __self_0, snapshot: __self_1, session: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"SetTransaction", "modes", __self_0, "snapshot", __self_1,
"session", &__self_2),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Set {
#[inline]
fn clone(&self) -> Set {
match self {
Set::SingleAssignment {
scope: __self_0,
hivevar: __self_1,
variable: __self_2,
values: __self_3 } =>
Set::SingleAssignment {
scope: ::core::clone::Clone::clone(__self_0),
hivevar: ::core::clone::Clone::clone(__self_1),
variable: ::core::clone::Clone::clone(__self_2),
values: ::core::clone::Clone::clone(__self_3),
},
Set::ParenthesizedAssignments {
variables: __self_0, values: __self_1 } =>
Set::ParenthesizedAssignments {
variables: ::core::clone::Clone::clone(__self_0),
values: ::core::clone::Clone::clone(__self_1),
},
Set::MultipleAssignments { assignments: __self_0 } =>
Set::MultipleAssignments {
assignments: ::core::clone::Clone::clone(__self_0),
},
Set::SetSessionParam(__self_0) =>
Set::SetSessionParam(::core::clone::Clone::clone(__self_0)),
Set::SetRole { context_modifier: __self_0, role_name: __self_1 }
=>
Set::SetRole {
context_modifier: ::core::clone::Clone::clone(__self_0),
role_name: ::core::clone::Clone::clone(__self_1),
},
Set::SetTimeZone { local: __self_0, value: __self_1 } =>
Set::SetTimeZone {
local: ::core::clone::Clone::clone(__self_0),
value: ::core::clone::Clone::clone(__self_1),
},
Set::SetNames { charset_name: __self_0, collation_name: __self_1 }
=>
Set::SetNames {
charset_name: ::core::clone::Clone::clone(__self_0),
collation_name: ::core::clone::Clone::clone(__self_1),
},
Set::SetNamesDefault {} => Set::SetNamesDefault {},
Set::SetTransaction {
modes: __self_0, snapshot: __self_1, session: __self_2 } =>
Set::SetTransaction {
modes: ::core::clone::Clone::clone(__self_0),
snapshot: ::core::clone::Clone::clone(__self_1),
session: ::core::clone::Clone::clone(__self_2),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Set {
#[inline]
fn eq(&self, other: &Set) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Set::SingleAssignment {
scope: __self_0,
hivevar: __self_1,
variable: __self_2,
values: __self_3 }, Set::SingleAssignment {
scope: __arg1_0,
hivevar: __arg1_1,
variable: __arg1_2,
values: __arg1_3 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Set::ParenthesizedAssignments {
variables: __self_0, values: __self_1 },
Set::ParenthesizedAssignments {
variables: __arg1_0, values: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Set::MultipleAssignments { assignments: __self_0 },
Set::MultipleAssignments { assignments: __arg1_0 }) =>
__self_0 == __arg1_0,
(Set::SetSessionParam(__self_0),
Set::SetSessionParam(__arg1_0)) => __self_0 == __arg1_0,
(Set::SetRole {
context_modifier: __self_0, role_name: __self_1 },
Set::SetRole {
context_modifier: __arg1_0, role_name: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Set::SetTimeZone { local: __self_0, value: __self_1 },
Set::SetTimeZone { local: __arg1_0, value: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Set::SetNames {
charset_name: __self_0, collation_name: __self_1 },
Set::SetNames {
charset_name: __arg1_0, collation_name: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Set::SetTransaction {
modes: __self_0, snapshot: __self_1, session: __self_2 },
Set::SetTransaction {
modes: __arg1_0, snapshot: __arg1_1, session: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Set {
#[inline]
fn partial_cmp(&self, other: &Set)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(Set::SingleAssignment {
scope: __self_0,
hivevar: __self_1,
variable: __self_2,
values: __self_3 }, Set::SingleAssignment {
scope: __arg1_0,
hivevar: __arg1_1,
variable: __arg1_2,
values: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Set::ParenthesizedAssignments {
variables: __self_0, values: __self_1 },
Set::ParenthesizedAssignments {
variables: __arg1_0, values: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::MultipleAssignments { assignments: __self_0 },
Set::MultipleAssignments { assignments: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Set::SetSessionParam(__self_0), Set::SetSessionParam(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Set::SetRole { context_modifier: __self_0, role_name: __self_1 },
Set::SetRole { context_modifier: __arg1_0, role_name: __arg1_1
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::SetTimeZone { local: __self_0, value: __self_1 },
Set::SetTimeZone { local: __arg1_0, value: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::SetNames { charset_name: __self_0, collation_name: __self_1
}, Set::SetNames {
charset_name: __arg1_0, collation_name: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::SetTransaction {
modes: __self_0, snapshot: __self_1, session: __self_2 },
Set::SetTransaction {
modes: __arg1_0, snapshot: __arg1_1, session: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Set {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<ContextModifier>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SetAssignment>>;
let _: ::core::cmp::AssertParamIsEq<SetSessionParamKind>;
let _: ::core::cmp::AssertParamIsEq<Option<ContextModifier>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Vec<TransactionMode>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Set {
#[inline]
fn cmp(&self, other: &Set) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Set::SingleAssignment {
scope: __self_0,
hivevar: __self_1,
variable: __self_2,
values: __self_3 }, Set::SingleAssignment {
scope: __arg1_0,
hivevar: __arg1_1,
variable: __arg1_2,
values: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Set::ParenthesizedAssignments {
variables: __self_0, values: __self_1 },
Set::ParenthesizedAssignments {
variables: __arg1_0, values: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::MultipleAssignments { assignments: __self_0 },
Set::MultipleAssignments { assignments: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Set::SetSessionParam(__self_0),
Set::SetSessionParam(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Set::SetRole {
context_modifier: __self_0, role_name: __self_1 },
Set::SetRole {
context_modifier: __arg1_0, role_name: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::SetTimeZone { local: __self_0, value: __self_1 },
Set::SetTimeZone { local: __arg1_0, value: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::SetNames {
charset_name: __self_0, collation_name: __self_1 },
Set::SetNames {
charset_name: __arg1_0, collation_name: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Set::SetTransaction {
modes: __self_0, snapshot: __self_1, session: __self_2 },
Set::SetTransaction {
modes: __arg1_0, snapshot: __arg1_1, session: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Set {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Set::SingleAssignment {
scope: __self_0,
hivevar: __self_1,
variable: __self_2,
values: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Set::ParenthesizedAssignments {
variables: __self_0, values: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Set::MultipleAssignments { assignments: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Set::SetSessionParam(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Set::SetRole { context_modifier: __self_0, role_name: __self_1 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Set::SetTimeZone { local: __self_0, value: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Set::SetNames { charset_name: __self_0, collation_name: __self_1 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Set::SetTransaction {
modes: __self_0, snapshot: __self_1, session: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
_ => {}
}
}
}Hash)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Set {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::SingleAssignment { scope, hivevar, variable, values } => {
sqlparser::ast::Visit::visit(scope, visitor)?;
sqlparser::ast::Visit::visit(hivevar, visitor)?;
sqlparser::ast::Visit::visit(variable, visitor)?;
sqlparser::ast::Visit::visit(values, visitor)?;
}
Self::ParenthesizedAssignments { variables, values } => {
sqlparser::ast::Visit::visit(variables, visitor)?;
sqlparser::ast::Visit::visit(values, visitor)?;
}
Self::MultipleAssignments { assignments } => {
sqlparser::ast::Visit::visit(assignments, visitor)?;
}
Self::SetSessionParam(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::SetRole { context_modifier, role_name } => {
sqlparser::ast::Visit::visit(context_modifier, visitor)?;
sqlparser::ast::Visit::visit(role_name, visitor)?;
}
Self::SetTimeZone { local, value } => {
sqlparser::ast::Visit::visit(local, visitor)?;
sqlparser::ast::Visit::visit(value, visitor)?;
}
Self::SetNames { charset_name, collation_name } => {
sqlparser::ast::Visit::visit(charset_name, visitor)?;
sqlparser::ast::Visit::visit(collation_name, visitor)?;
}
Self::SetNamesDefault {} => {}
Self::SetTransaction { modes, snapshot, session } => {
sqlparser::ast::Visit::visit(modes, visitor)?;
sqlparser::ast::Visit::visit(snapshot, visitor)?;
sqlparser::ast::Visit::visit(session, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Set {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::SingleAssignment { scope, hivevar, variable, values } => {
sqlparser::ast::VisitMut::visit(scope, visitor)?;
sqlparser::ast::VisitMut::visit(hivevar, visitor)?;
sqlparser::ast::VisitMut::visit(variable, visitor)?;
sqlparser::ast::VisitMut::visit(values, visitor)?;
}
Self::ParenthesizedAssignments { variables, values } => {
sqlparser::ast::VisitMut::visit(variables, visitor)?;
sqlparser::ast::VisitMut::visit(values, visitor)?;
}
Self::MultipleAssignments { assignments } => {
sqlparser::ast::VisitMut::visit(assignments, visitor)?;
}
Self::SetSessionParam(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::SetRole { context_modifier, role_name } => {
sqlparser::ast::VisitMut::visit(context_modifier, visitor)?;
sqlparser::ast::VisitMut::visit(role_name, visitor)?;
}
Self::SetTimeZone { local, value } => {
sqlparser::ast::VisitMut::visit(local, visitor)?;
sqlparser::ast::VisitMut::visit(value, visitor)?;
}
Self::SetNames { charset_name, collation_name } => {
sqlparser::ast::VisitMut::visit(charset_name, visitor)?;
sqlparser::ast::VisitMut::visit(collation_name, visitor)?;
}
Self::SetNamesDefault {} => {}
Self::SetTransaction { modes, snapshot, session } => {
sqlparser::ast::VisitMut::visit(modes, visitor)?;
sqlparser::ast::VisitMut::visit(snapshot, visitor)?;
sqlparser::ast::VisitMut::visit(session, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
2878pub enum Set {
2879 SingleAssignment {
2882 scope: Option<ContextModifier>,
2883 hivevar: bool,
2884 variable: ObjectName,
2885 values: Vec<Expr>,
2886 },
2887 ParenthesizedAssignments {
2890 variables: Vec<ObjectName>,
2891 values: Vec<Expr>,
2892 },
2893 MultipleAssignments { assignments: Vec<SetAssignment> },
2896 SetSessionParam(SetSessionParamKind),
2900 SetRole {
2911 context_modifier: Option<ContextModifier>,
2913 role_name: Option<Ident>,
2915 },
2916 SetTimeZone { local: bool, value: Expr },
2924 SetNames {
2928 charset_name: Ident,
2929 collation_name: Option<String>,
2930 },
2931 SetNamesDefault {},
2937 SetTransaction {
2941 modes: Vec<TransactionMode>,
2942 snapshot: Option<Value>,
2943 session: bool,
2944 },
2945}
2946
2947impl Display for Set {
2948 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2949 match self {
2950 Self::ParenthesizedAssignments { variables, values } => f.write_fmt(format_args!("SET ({0}) = ({1})",
display_comma_separated(variables), display_comma_separated(values)))write!(
2951 f,
2952 "SET ({}) = ({})",
2953 display_comma_separated(variables),
2954 display_comma_separated(values)
2955 ),
2956 Self::MultipleAssignments { assignments } => {
2957 f.write_fmt(format_args!("SET {0}", display_comma_separated(assignments)))write!(f, "SET {}", display_comma_separated(assignments))
2958 }
2959 Self::SetRole {
2960 context_modifier,
2961 role_name,
2962 } => {
2963 let role_name = role_name.clone().unwrap_or_else(|| Ident::new("NONE"));
2964 f.write_fmt(format_args!("SET {0}ROLE {1}",
context_modifier.map(|m|
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", m))
})).unwrap_or_default(), role_name))write!(
2965 f,
2966 "SET {modifier}ROLE {role_name}",
2967 modifier = context_modifier.map(|m| format!("{m}")).unwrap_or_default()
2968 )
2969 }
2970 Self::SetSessionParam(kind) => f.write_fmt(format_args!("SET {0}", kind))write!(f, "SET {kind}"),
2971 Self::SetTransaction {
2972 modes,
2973 snapshot,
2974 session,
2975 } => {
2976 if *session {
2977 f.write_fmt(format_args!("SET SESSION CHARACTERISTICS AS TRANSACTION"))write!(f, "SET SESSION CHARACTERISTICS AS TRANSACTION")?;
2978 } else {
2979 f.write_fmt(format_args!("SET TRANSACTION"))write!(f, "SET TRANSACTION")?;
2980 }
2981 if !modes.is_empty() {
2982 f.write_fmt(format_args!(" {0}", display_comma_separated(modes)))write!(f, " {}", display_comma_separated(modes))?;
2983 }
2984 if let Some(snapshot_id) = snapshot {
2985 f.write_fmt(format_args!(" SNAPSHOT {0}", snapshot_id))write!(f, " SNAPSHOT {snapshot_id}")?;
2986 }
2987 Ok(())
2988 }
2989 Self::SetTimeZone { local, value } => {
2990 f.write_str("SET ")?;
2991 if *local {
2992 f.write_str("LOCAL ")?;
2993 }
2994 f.write_fmt(format_args!("TIME ZONE {0}", value))write!(f, "TIME ZONE {value}")
2995 }
2996 Self::SetNames {
2997 charset_name,
2998 collation_name,
2999 } => {
3000 f.write_fmt(format_args!("SET NAMES {0}", charset_name))write!(f, "SET NAMES {charset_name}")?;
3001
3002 if let Some(collation) = collation_name {
3003 f.write_str(" COLLATE ")?;
3004 f.write_str(collation)?;
3005 };
3006
3007 Ok(())
3008 }
3009 Self::SetNamesDefault {} => {
3010 f.write_str("SET NAMES DEFAULT")?;
3011
3012 Ok(())
3013 }
3014 Set::SingleAssignment {
3015 scope,
3016 hivevar,
3017 variable,
3018 values,
3019 } => {
3020 f.write_fmt(format_args!("SET {0}{1}{2} = {3}",
scope.map(|s|
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", s))
})).unwrap_or_default(),
if *hivevar { "HIVEVAR:" } else { "" }, variable,
display_comma_separated(values)))write!(
3021 f,
3022 "SET {}{}{} = {}",
3023 scope.map(|s| format!("{s}")).unwrap_or_default(),
3024 if *hivevar { "HIVEVAR:" } else { "" },
3025 variable,
3026 display_comma_separated(values)
3027 )
3028 }
3029 }
3030 }
3031}
3032
3033#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ExceptionWhen {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "ExceptionWhen",
"idents", &self.idents, "statements", &&self.statements)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ExceptionWhen {
#[inline]
fn clone(&self) -> ExceptionWhen {
ExceptionWhen {
idents: ::core::clone::Clone::clone(&self.idents),
statements: ::core::clone::Clone::clone(&self.statements),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ExceptionWhen {
#[inline]
fn eq(&self, other: &ExceptionWhen) -> bool {
self.idents == other.idents && self.statements == other.statements
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ExceptionWhen {
#[inline]
fn partial_cmp(&self, other: &ExceptionWhen)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.idents,
&other.idents) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.statements,
&other.statements),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ExceptionWhen {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Statement>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ExceptionWhen {
#[inline]
fn cmp(&self, other: &ExceptionWhen) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.idents, &other.idents) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.statements, &other.statements),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ExceptionWhen {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.idents, state);
::core::hash::Hash::hash(&self.statements, state)
}
}Hash)]
3039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3040#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ExceptionWhen {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.idents, visitor)?;
sqlparser::ast::Visit::visit(&self.statements, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ExceptionWhen {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.idents, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.statements, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
3041pub struct ExceptionWhen {
3042 pub idents: Vec<Ident>,
3043 pub statements: Vec<Statement>,
3044}
3045
3046impl Display for ExceptionWhen {
3047 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3048 f.write_fmt(format_args!("WHEN {0} THEN",
display_separated(&self.idents, " OR ")))write!(
3049 f,
3050 "WHEN {idents} THEN",
3051 idents = display_separated(&self.idents, " OR ")
3052 )?;
3053
3054 if !self.statements.is_empty() {
3055 f.write_fmt(format_args!(" "))write!(f, " ")?;
3056 format_statement_list(f, &self.statements)?;
3057 }
3058
3059 Ok(())
3060 }
3061}
3062
3063#[allow(clippy::large_enum_variant)]
3065#[derive(#[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::fmt::Debug for Statement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Statement::Analyze {
table_name: __self_0,
partitions: __self_1,
for_columns: __self_2,
columns: __self_3,
cache_metadata: __self_4,
noscan: __self_5,
compute_statistics: __self_6,
has_table_keyword: __self_7 } => {
let names: &'static _ =
&["table_name", "partitions", "for_columns", "columns",
"cache_metadata", "noscan", "compute_statistics",
"has_table_keyword"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, &__self_7];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Analyze", names, values)
}
Statement::Set(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Set",
&__self_0),
Statement::Truncate {
table_names: __self_0,
partitions: __self_1,
table: __self_2,
identity: __self_3,
cascade: __self_4,
on_cluster: __self_5 } => {
let names: &'static _ =
&["table_names", "partitions", "table", "identity",
"cascade", "on_cluster"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Truncate", names, values)
}
Statement::Msck {
table_name: __self_0,
repair: __self_1,
partition_action: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f, "Msck",
"table_name", __self_0, "repair", __self_1,
"partition_action", &__self_2),
Statement::Query(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Query",
&__self_0),
Statement::Insert(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Insert",
&__self_0),
Statement::Install { extension_name: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Install", "extension_name", &__self_0),
Statement::Load { extension_name: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Load",
"extension_name", &__self_0),
Statement::Directory {
overwrite: __self_0,
local: __self_1,
path: __self_2,
file_format: __self_3,
source: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"Directory", "overwrite", __self_0, "local", __self_1,
"path", __self_2, "file_format", __self_3, "source",
&__self_4),
Statement::Case(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Case",
&__self_0),
Statement::If(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "If",
&__self_0),
Statement::While(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "While",
&__self_0),
Statement::Raise(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Raise",
&__self_0),
Statement::Call(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Call",
&__self_0),
Statement::Copy {
source: __self_0,
to: __self_1,
target: __self_2,
options: __self_3,
legacy_options: __self_4,
values: __self_5 } => {
let names: &'static _ =
&["source", "to", "target", "options", "legacy_options",
"values"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Copy",
names, values)
}
Statement::CopyIntoSnowflake {
kind: __self_0,
into: __self_1,
into_columns: __self_2,
from_obj: __self_3,
from_obj_alias: __self_4,
stage_params: __self_5,
from_transformations: __self_6,
from_query: __self_7,
files: __self_8,
pattern: __self_9,
file_format: __self_10,
copy_options: __self_11,
validation_mode: __self_12,
partition: __self_13 } => {
let names: &'static _ =
&["kind", "into", "into_columns", "from_obj",
"from_obj_alias", "stage_params", "from_transformations",
"from_query", "files", "pattern", "file_format",
"copy_options", "validation_mode", "partition"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, __self_7, __self_8, __self_9, __self_10,
__self_11, __self_12, &__self_13];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CopyIntoSnowflake", names, values)
}
Statement::Open(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Open",
&__self_0),
Statement::Close { cursor: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Close",
"cursor", &__self_0),
Statement::Update {
table: __self_0,
assignments: __self_1,
from: __self_2,
selection: __self_3,
returning: __self_4,
or: __self_5,
limit: __self_6 } => {
let names: &'static _ =
&["table", "assignments", "from", "selection", "returning",
"or", "limit"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, &__self_6];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Update", names, values)
}
Statement::Delete(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Delete",
&__self_0),
Statement::CreateView {
or_alter: __self_0,
or_replace: __self_1,
materialized: __self_2,
secure: __self_3,
name: __self_4,
name_before_not_exists: __self_5,
columns: __self_6,
query: __self_7,
options: __self_8,
cluster_by: __self_9,
comment: __self_10,
with_no_schema_binding: __self_11,
if_not_exists: __self_12,
temporary: __self_13,
to: __self_14,
params: __self_15 } => {
let names: &'static _ =
&["or_alter", "or_replace", "materialized", "secure",
"name", "name_before_not_exists", "columns", "query",
"options", "cluster_by", "comment",
"with_no_schema_binding", "if_not_exists", "temporary",
"to", "params"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, __self_7, __self_8, __self_9, __self_10,
__self_11, __self_12, __self_13, __self_14, &__self_15];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateView", names, values)
}
Statement::CreateTable(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateTable", &__self_0),
Statement::CreateVirtualTable {
name: __self_0,
if_not_exists: __self_1,
module_name: __self_2,
module_args: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"CreateVirtualTable", "name", __self_0, "if_not_exists",
__self_1, "module_name", __self_2, "module_args",
&__self_3),
Statement::CreateIndex(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateIndex", &__self_0),
Statement::CreateRole {
names: __self_0,
if_not_exists: __self_1,
login: __self_2,
inherit: __self_3,
bypassrls: __self_4,
password: __self_5,
superuser: __self_6,
create_db: __self_7,
create_role: __self_8,
replication: __self_9,
connection_limit: __self_10,
valid_until: __self_11,
in_role: __self_12,
in_group: __self_13,
role: __self_14,
user: __self_15,
admin: __self_16,
authorization_owner: __self_17 } => {
let names: &'static _ =
&["names", "if_not_exists", "login", "inherit", "bypassrls",
"password", "superuser", "create_db", "create_role",
"replication", "connection_limit", "valid_until", "in_role",
"in_group", "role", "user", "admin", "authorization_owner"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, __self_7, __self_8, __self_9, __self_10,
__self_11, __self_12, __self_13, __self_14, __self_15,
__self_16, &__self_17];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateRole", names, values)
}
Statement::CreateSecret {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
storage_specifier: __self_4,
secret_type: __self_5,
options: __self_6 } => {
let names: &'static _ =
&["or_replace", "temporary", "if_not_exists", "name",
"storage_specifier", "secret_type", "options"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, &__self_6];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateSecret", names, values)
}
Statement::CreateServer(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateServer", &__self_0),
Statement::CreatePolicy {
name: __self_0,
table_name: __self_1,
policy_type: __self_2,
command: __self_3,
to: __self_4,
using: __self_5,
with_check: __self_6 } => {
let names: &'static _ =
&["name", "table_name", "policy_type", "command", "to",
"using", "with_check"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, &__self_6];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreatePolicy", names, values)
}
Statement::CreateConnector(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateConnector", &__self_0),
Statement::AlterTable {
name: __self_0,
if_exists: __self_1,
only: __self_2,
operations: __self_3,
location: __self_4,
on_cluster: __self_5,
iceberg: __self_6,
end_token: __self_7 } => {
let names: &'static _ =
&["name", "if_exists", "only", "operations", "location",
"on_cluster", "iceberg", "end_token"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, &__self_7];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"AlterTable", names, values)
}
Statement::AlterSchema(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AlterSchema", &__self_0),
Statement::AlterIndex { name: __self_0, operation: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"AlterIndex", "name", __self_0, "operation", &__self_1),
Statement::AlterView {
name: __self_0,
columns: __self_1,
query: __self_2,
with_options: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"AlterView", "name", __self_0, "columns", __self_1, "query",
__self_2, "with_options", &__self_3),
Statement::AlterType(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AlterType", &__self_0),
Statement::AlterRole { name: __self_0, operation: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"AlterRole", "name", __self_0, "operation", &__self_1),
Statement::AlterPolicy {
name: __self_0, table_name: __self_1, operation: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"AlterPolicy", "name", __self_0, "table_name", __self_1,
"operation", &__self_2),
Statement::AlterConnector {
name: __self_0,
properties: __self_1,
url: __self_2,
owner: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"AlterConnector", "name", __self_0, "properties", __self_1,
"url", __self_2, "owner", &__self_3),
Statement::AlterSession { set: __self_0, session_params: __self_1
} =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"AlterSession", "set", __self_0, "session_params",
&__self_1),
Statement::AttachDatabase {
schema_name: __self_0,
database_file_name: __self_1,
database: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"AttachDatabase", "schema_name", __self_0,
"database_file_name", __self_1, "database", &__self_2),
Statement::AttachDuckDBDatabase {
if_not_exists: __self_0,
database: __self_1,
database_path: __self_2,
database_alias: __self_3,
attach_options: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"AttachDuckDBDatabase", "if_not_exists", __self_0,
"database", __self_1, "database_path", __self_2,
"database_alias", __self_3, "attach_options", &__self_4),
Statement::DetachDuckDBDatabase {
if_exists: __self_0,
database: __self_1,
database_alias: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"DetachDuckDBDatabase", "if_exists", __self_0, "database",
__self_1, "database_alias", &__self_2),
Statement::Drop {
object_type: __self_0,
if_exists: __self_1,
names: __self_2,
cascade: __self_3,
restrict: __self_4,
purge: __self_5,
temporary: __self_6,
table: __self_7 } => {
let names: &'static _ =
&["object_type", "if_exists", "names", "cascade",
"restrict", "purge", "temporary", "table"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, &__self_7];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Drop",
names, values)
}
Statement::DropFunction {
if_exists: __self_0,
func_desc: __self_1,
drop_behavior: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"DropFunction", "if_exists", __self_0, "func_desc",
__self_1, "drop_behavior", &__self_2),
Statement::DropDomain(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DropDomain", &__self_0),
Statement::DropProcedure {
if_exists: __self_0,
proc_desc: __self_1,
drop_behavior: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"DropProcedure", "if_exists", __self_0, "proc_desc",
__self_1, "drop_behavior", &__self_2),
Statement::DropSecret {
if_exists: __self_0,
temporary: __self_1,
name: __self_2,
storage_specifier: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"DropSecret", "if_exists", __self_0, "temporary", __self_1,
"name", __self_2, "storage_specifier", &__self_3),
Statement::DropPolicy {
if_exists: __self_0,
name: __self_1,
table_name: __self_2,
drop_behavior: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"DropPolicy", "if_exists", __self_0, "name", __self_1,
"table_name", __self_2, "drop_behavior", &__self_3),
Statement::DropConnector { if_exists: __self_0, name: __self_1 }
=>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"DropConnector", "if_exists", __self_0, "name", &__self_1),
Statement::Declare { stmts: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Declare", "stmts", &__self_0),
Statement::CreateExtension {
name: __self_0,
if_not_exists: __self_1,
cascade: __self_2,
schema: __self_3,
version: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"CreateExtension", "name", __self_0, "if_not_exists",
__self_1, "cascade", __self_2, "schema", __self_3,
"version", &__self_4),
Statement::DropExtension {
names: __self_0,
if_exists: __self_1,
cascade_or_restrict: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"DropExtension", "names", __self_0, "if_exists", __self_1,
"cascade_or_restrict", &__self_2),
Statement::Fetch {
name: __self_0,
direction: __self_1,
position: __self_2,
into: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f, "Fetch",
"name", __self_0, "direction", __self_1, "position",
__self_2, "into", &__self_3),
Statement::Flush {
object_type: __self_0,
location: __self_1,
channel: __self_2,
read_lock: __self_3,
export: __self_4,
tables: __self_5 } => {
let names: &'static _ =
&["object_type", "location", "channel", "read_lock",
"export", "tables"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Flush",
names, values)
}
Statement::Discard { object_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Discard", "object_type", &__self_0),
Statement::ShowFunctions { filter: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"ShowFunctions", "filter", &__self_0),
Statement::ShowVariable { variable: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"ShowVariable", "variable", &__self_0),
Statement::ShowStatus {
filter: __self_0, global: __self_1, session: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowStatus", "filter", __self_0, "global", __self_1,
"session", &__self_2),
Statement::ShowVariables {
filter: __self_0, global: __self_1, session: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowVariables", "filter", __self_0, "global", __self_1,
"session", &__self_2),
Statement::ShowCreate { obj_type: __self_0, obj_name: __self_1 }
=>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"ShowCreate", "obj_type", __self_0, "obj_name", &__self_1),
Statement::ShowColumns {
extended: __self_0, full: __self_1, show_options: __self_2 }
=>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowColumns", "extended", __self_0, "full", __self_1,
"show_options", &__self_2),
Statement::ShowDatabases {
terse: __self_0, history: __self_1, show_options: __self_2 }
=>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowDatabases", "terse", __self_0, "history", __self_1,
"show_options", &__self_2),
Statement::ShowSchemas {
terse: __self_0, history: __self_1, show_options: __self_2 }
=>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowSchemas", "terse", __self_0, "history", __self_1,
"show_options", &__self_2),
Statement::ShowCharset(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ShowCharset", &__self_0),
Statement::ShowObjects(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ShowObjects", &__self_0),
Statement::ShowTables {
terse: __self_0,
history: __self_1,
extended: __self_2,
full: __self_3,
external: __self_4,
show_options: __self_5 } => {
let names: &'static _ =
&["terse", "history", "extended", "full", "external",
"show_options"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"ShowTables", names, values)
}
Statement::ShowViews {
terse: __self_0,
materialized: __self_1,
show_options: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowViews", "terse", __self_0, "materialized", __self_1,
"show_options", &__self_2),
Statement::ShowCollation { filter: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"ShowCollation", "filter", &__self_0),
Statement::Use(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Use",
&__self_0),
Statement::StartTransaction {
modes: __self_0,
begin: __self_1,
transaction: __self_2,
modifier: __self_3,
statements: __self_4,
exception: __self_5,
has_end_keyword: __self_6 } => {
let names: &'static _ =
&["modes", "begin", "transaction", "modifier", "statements",
"exception", "has_end_keyword"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, &__self_6];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"StartTransaction", names, values)
}
Statement::Comment {
object_type: __self_0,
object_name: __self_1,
comment: __self_2,
if_exists: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"Comment", "object_type", __self_0, "object_name", __self_1,
"comment", __self_2, "if_exists", &__self_3),
Statement::Commit {
chain: __self_0, end: __self_1, modifier: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"Commit", "chain", __self_0, "end", __self_1, "modifier",
&__self_2),
Statement::Rollback { chain: __self_0, savepoint: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Rollback", "chain", __self_0, "savepoint", &__self_1),
Statement::CreateSchema {
schema_name: __self_0,
if_not_exists: __self_1,
with: __self_2,
options: __self_3,
default_collate_spec: __self_4,
clone: __self_5 } => {
let names: &'static _ =
&["schema_name", "if_not_exists", "with", "options",
"default_collate_spec", "clone"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateSchema", names, values)
}
Statement::CreateDatabase {
db_name: __self_0,
if_not_exists: __self_1,
location: __self_2,
managed_location: __self_3,
or_replace: __self_4,
transient: __self_5,
clone: __self_6,
data_retention_time_in_days: __self_7,
max_data_extension_time_in_days: __self_8,
external_volume: __self_9,
catalog: __self_10,
replace_invalid_characters: __self_11,
default_ddl_collation: __self_12,
storage_serialization_policy: __self_13,
comment: __self_14,
catalog_sync: __self_15,
catalog_sync_namespace_mode: __self_16,
catalog_sync_namespace_flatten_delimiter: __self_17,
with_tags: __self_18,
with_contacts: __self_19 } => {
let names: &'static _ =
&["db_name", "if_not_exists", "location",
"managed_location", "or_replace", "transient", "clone",
"data_retention_time_in_days",
"max_data_extension_time_in_days", "external_volume",
"catalog", "replace_invalid_characters",
"default_ddl_collation", "storage_serialization_policy",
"comment", "catalog_sync", "catalog_sync_namespace_mode",
"catalog_sync_namespace_flatten_delimiter", "with_tags",
"with_contacts"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, __self_7, __self_8, __self_9, __self_10,
__self_11, __self_12, __self_13, __self_14, __self_15,
__self_16, __self_17, __self_18, &__self_19];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateDatabase", names, values)
}
Statement::CreateFunction(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateFunction", &__self_0),
Statement::CreateTrigger(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateTrigger", &__self_0),
Statement::DropTrigger(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DropTrigger", &__self_0),
Statement::CreateProcedure {
or_alter: __self_0,
name: __self_1,
params: __self_2,
language: __self_3,
body: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"CreateProcedure", "or_alter", __self_0, "name", __self_1,
"params", __self_2, "language", __self_3, "body",
&__self_4),
Statement::CreateMacro {
or_replace: __self_0,
temporary: __self_1,
name: __self_2,
args: __self_3,
definition: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"CreateMacro", "or_replace", __self_0, "temporary",
__self_1, "name", __self_2, "args", __self_3, "definition",
&__self_4),
Statement::CreateStage {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
stage_params: __self_4,
directory_table_params: __self_5,
file_format: __self_6,
copy_options: __self_7,
comment: __self_8 } => {
let names: &'static _ =
&["or_replace", "temporary", "if_not_exists", "name",
"stage_params", "directory_table_params", "file_format",
"copy_options", "comment"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, __self_7, &__self_8];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateStage", names, values)
}
Statement::Assert { condition: __self_0, message: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Assert", "condition", __self_0, "message", &__self_1),
Statement::Grant {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
with_grant_option: __self_3,
as_grantor: __self_4,
granted_by: __self_5,
current_grants: __self_6 } => {
let names: &'static _ =
&["privileges", "objects", "grantees", "with_grant_option",
"as_grantor", "granted_by", "current_grants"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, &__self_6];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Grant",
names, values)
}
Statement::Deny(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Deny",
&__self_0),
Statement::Revoke {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
granted_by: __self_3,
cascade: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"Revoke", "privileges", __self_0, "objects", __self_1,
"grantees", __self_2, "granted_by", __self_3, "cascade",
&__self_4),
Statement::Deallocate { name: __self_0, prepare: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Deallocate", "name", __self_0, "prepare", &__self_1),
Statement::Execute {
name: __self_0,
parameters: __self_1,
has_parentheses: __self_2,
immediate: __self_3,
into: __self_4,
using: __self_5,
output: __self_6,
default: __self_7 } => {
let names: &'static _ =
&["name", "parameters", "has_parentheses", "immediate",
"into", "using", "output", "default"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, &__self_7];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Execute", names, values)
}
Statement::Prepare {
name: __self_0, data_types: __self_1, statement: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"Prepare", "name", __self_0, "data_types", __self_1,
"statement", &__self_2),
Statement::Kill { modifier: __self_0, id: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "Kill",
"modifier", __self_0, "id", &__self_1),
Statement::ExplainTable {
describe_alias: __self_0,
hive_format: __self_1,
has_table_keyword: __self_2,
table_name: __self_3 } =>
::core::fmt::Formatter::debug_struct_field4_finish(f,
"ExplainTable", "describe_alias", __self_0, "hive_format",
__self_1, "has_table_keyword", __self_2, "table_name",
&__self_3),
Statement::Explain {
describe_alias: __self_0,
analyze: __self_1,
verbose: __self_2,
query_plan: __self_3,
estimate: __self_4,
statement: __self_5,
format: __self_6,
options: __self_7 } => {
let names: &'static _ =
&["describe_alias", "analyze", "verbose", "query_plan",
"estimate", "statement", "format", "options"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
__self_5, __self_6, &__self_7];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Explain", names, values)
}
Statement::Savepoint { name: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Savepoint", "name", &__self_0),
Statement::ReleaseSavepoint { name: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"ReleaseSavepoint", "name", &__self_0),
Statement::Merge {
into: __self_0,
table: __self_1,
source: __self_2,
on: __self_3,
clauses: __self_4,
output: __self_5 } => {
let names: &'static _ =
&["into", "table", "source", "on", "clauses", "output"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Merge",
names, values)
}
Statement::Cache {
table_flag: __self_0,
table_name: __self_1,
has_as: __self_2,
options: __self_3,
query: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f, "Cache",
"table_flag", __self_0, "table_name", __self_1, "has_as",
__self_2, "options", __self_3, "query", &__self_4),
Statement::UNCache { table_name: __self_0, if_exists: __self_1 }
=>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"UNCache", "table_name", __self_0, "if_exists", &__self_1),
Statement::CreateSequence {
temporary: __self_0,
if_not_exists: __self_1,
name: __self_2,
data_type: __self_3,
sequence_options: __self_4,
owned_by: __self_5 } => {
let names: &'static _ =
&["temporary", "if_not_exists", "name", "data_type",
"sequence_options", "owned_by"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateSequence", names, values)
}
Statement::CreateDomain(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateDomain", &__self_0),
Statement::CreateType { name: __self_0, representation: __self_1 }
=>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"CreateType", "name", __self_0, "representation",
&__self_1),
Statement::Pragma {
name: __self_0, value: __self_1, is_eq: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"Pragma", "name", __self_0, "value", __self_1, "is_eq",
&__self_2),
Statement::LockTables { tables: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"LockTables", "tables", &__self_0),
Statement::UnlockTables =>
::core::fmt::Formatter::write_str(f, "UnlockTables"),
Statement::Unload {
query: __self_0,
query_text: __self_1,
to: __self_2,
auth: __self_3,
with: __self_4,
options: __self_5 } => {
let names: &'static _ =
&["query", "query_text", "to", "auth", "with", "options"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"Unload", names, values)
}
Statement::OptimizeTable {
name: __self_0,
on_cluster: __self_1,
partition: __self_2,
include_final: __self_3,
deduplicate: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"OptimizeTable", "name", __self_0, "on_cluster", __self_1,
"partition", __self_2, "include_final", __self_3,
"deduplicate", &__self_4),
Statement::LISTEN { channel: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"LISTEN", "channel", &__self_0),
Statement::UNLISTEN { channel: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"UNLISTEN", "channel", &__self_0),
Statement::NOTIFY { channel: __self_0, payload: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"NOTIFY", "channel", __self_0, "payload", &__self_1),
Statement::LoadData {
local: __self_0,
inpath: __self_1,
overwrite: __self_2,
table_name: __self_3,
partitioned: __self_4,
table_format: __self_5 } => {
let names: &'static _ =
&["local", "inpath", "overwrite", "table_name",
"partitioned", "table_format"];
let values: &[&dyn ::core::fmt::Debug] =
&[__self_0, __self_1, __self_2, __self_3, __self_4,
&__self_5];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"LoadData", names, values)
}
Statement::RenameTable(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"RenameTable", &__self_0),
Statement::List(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "List",
&__self_0),
Statement::Remove(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Remove",
&__self_0),
Statement::RaisError {
message: __self_0,
severity: __self_1,
state: __self_2,
arguments: __self_3,
options: __self_4 } =>
::core::fmt::Formatter::debug_struct_field5_finish(f,
"RaisError", "message", __self_0, "severity", __self_1,
"state", __self_2, "arguments", __self_3, "options",
&__self_4),
Statement::Print(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Print",
&__self_0),
Statement::Return(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Return",
&__self_0),
Statement::ExportData(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ExportData", &__self_0),
Statement::CreateUser(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"CreateUser", &__self_0),
Statement::Vacuum(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Vacuum",
&__self_0),
}
}
}Debug, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::clone::Clone for Statement {
#[inline]
fn clone(&self) -> Statement {
match self {
Statement::Analyze {
table_name: __self_0,
partitions: __self_1,
for_columns: __self_2,
columns: __self_3,
cache_metadata: __self_4,
noscan: __self_5,
compute_statistics: __self_6,
has_table_keyword: __self_7 } =>
Statement::Analyze {
table_name: ::core::clone::Clone::clone(__self_0),
partitions: ::core::clone::Clone::clone(__self_1),
for_columns: ::core::clone::Clone::clone(__self_2),
columns: ::core::clone::Clone::clone(__self_3),
cache_metadata: ::core::clone::Clone::clone(__self_4),
noscan: ::core::clone::Clone::clone(__self_5),
compute_statistics: ::core::clone::Clone::clone(__self_6),
has_table_keyword: ::core::clone::Clone::clone(__self_7),
},
Statement::Set(__self_0) =>
Statement::Set(::core::clone::Clone::clone(__self_0)),
Statement::Truncate {
table_names: __self_0,
partitions: __self_1,
table: __self_2,
identity: __self_3,
cascade: __self_4,
on_cluster: __self_5 } =>
Statement::Truncate {
table_names: ::core::clone::Clone::clone(__self_0),
partitions: ::core::clone::Clone::clone(__self_1),
table: ::core::clone::Clone::clone(__self_2),
identity: ::core::clone::Clone::clone(__self_3),
cascade: ::core::clone::Clone::clone(__self_4),
on_cluster: ::core::clone::Clone::clone(__self_5),
},
Statement::Msck {
table_name: __self_0,
repair: __self_1,
partition_action: __self_2 } =>
Statement::Msck {
table_name: ::core::clone::Clone::clone(__self_0),
repair: ::core::clone::Clone::clone(__self_1),
partition_action: ::core::clone::Clone::clone(__self_2),
},
Statement::Query(__self_0) =>
Statement::Query(::core::clone::Clone::clone(__self_0)),
Statement::Insert(__self_0) =>
Statement::Insert(::core::clone::Clone::clone(__self_0)),
Statement::Install { extension_name: __self_0 } =>
Statement::Install {
extension_name: ::core::clone::Clone::clone(__self_0),
},
Statement::Load { extension_name: __self_0 } =>
Statement::Load {
extension_name: ::core::clone::Clone::clone(__self_0),
},
Statement::Directory {
overwrite: __self_0,
local: __self_1,
path: __self_2,
file_format: __self_3,
source: __self_4 } =>
Statement::Directory {
overwrite: ::core::clone::Clone::clone(__self_0),
local: ::core::clone::Clone::clone(__self_1),
path: ::core::clone::Clone::clone(__self_2),
file_format: ::core::clone::Clone::clone(__self_3),
source: ::core::clone::Clone::clone(__self_4),
},
Statement::Case(__self_0) =>
Statement::Case(::core::clone::Clone::clone(__self_0)),
Statement::If(__self_0) =>
Statement::If(::core::clone::Clone::clone(__self_0)),
Statement::While(__self_0) =>
Statement::While(::core::clone::Clone::clone(__self_0)),
Statement::Raise(__self_0) =>
Statement::Raise(::core::clone::Clone::clone(__self_0)),
Statement::Call(__self_0) =>
Statement::Call(::core::clone::Clone::clone(__self_0)),
Statement::Copy {
source: __self_0,
to: __self_1,
target: __self_2,
options: __self_3,
legacy_options: __self_4,
values: __self_5 } =>
Statement::Copy {
source: ::core::clone::Clone::clone(__self_0),
to: ::core::clone::Clone::clone(__self_1),
target: ::core::clone::Clone::clone(__self_2),
options: ::core::clone::Clone::clone(__self_3),
legacy_options: ::core::clone::Clone::clone(__self_4),
values: ::core::clone::Clone::clone(__self_5),
},
Statement::CopyIntoSnowflake {
kind: __self_0,
into: __self_1,
into_columns: __self_2,
from_obj: __self_3,
from_obj_alias: __self_4,
stage_params: __self_5,
from_transformations: __self_6,
from_query: __self_7,
files: __self_8,
pattern: __self_9,
file_format: __self_10,
copy_options: __self_11,
validation_mode: __self_12,
partition: __self_13 } =>
Statement::CopyIntoSnowflake {
kind: ::core::clone::Clone::clone(__self_0),
into: ::core::clone::Clone::clone(__self_1),
into_columns: ::core::clone::Clone::clone(__self_2),
from_obj: ::core::clone::Clone::clone(__self_3),
from_obj_alias: ::core::clone::Clone::clone(__self_4),
stage_params: ::core::clone::Clone::clone(__self_5),
from_transformations: ::core::clone::Clone::clone(__self_6),
from_query: ::core::clone::Clone::clone(__self_7),
files: ::core::clone::Clone::clone(__self_8),
pattern: ::core::clone::Clone::clone(__self_9),
file_format: ::core::clone::Clone::clone(__self_10),
copy_options: ::core::clone::Clone::clone(__self_11),
validation_mode: ::core::clone::Clone::clone(__self_12),
partition: ::core::clone::Clone::clone(__self_13),
},
Statement::Open(__self_0) =>
Statement::Open(::core::clone::Clone::clone(__self_0)),
Statement::Close { cursor: __self_0 } =>
Statement::Close {
cursor: ::core::clone::Clone::clone(__self_0),
},
Statement::Update {
table: __self_0,
assignments: __self_1,
from: __self_2,
selection: __self_3,
returning: __self_4,
or: __self_5,
limit: __self_6 } =>
Statement::Update {
table: ::core::clone::Clone::clone(__self_0),
assignments: ::core::clone::Clone::clone(__self_1),
from: ::core::clone::Clone::clone(__self_2),
selection: ::core::clone::Clone::clone(__self_3),
returning: ::core::clone::Clone::clone(__self_4),
or: ::core::clone::Clone::clone(__self_5),
limit: ::core::clone::Clone::clone(__self_6),
},
Statement::Delete(__self_0) =>
Statement::Delete(::core::clone::Clone::clone(__self_0)),
Statement::CreateView {
or_alter: __self_0,
or_replace: __self_1,
materialized: __self_2,
secure: __self_3,
name: __self_4,
name_before_not_exists: __self_5,
columns: __self_6,
query: __self_7,
options: __self_8,
cluster_by: __self_9,
comment: __self_10,
with_no_schema_binding: __self_11,
if_not_exists: __self_12,
temporary: __self_13,
to: __self_14,
params: __self_15 } =>
Statement::CreateView {
or_alter: ::core::clone::Clone::clone(__self_0),
or_replace: ::core::clone::Clone::clone(__self_1),
materialized: ::core::clone::Clone::clone(__self_2),
secure: ::core::clone::Clone::clone(__self_3),
name: ::core::clone::Clone::clone(__self_4),
name_before_not_exists: ::core::clone::Clone::clone(__self_5),
columns: ::core::clone::Clone::clone(__self_6),
query: ::core::clone::Clone::clone(__self_7),
options: ::core::clone::Clone::clone(__self_8),
cluster_by: ::core::clone::Clone::clone(__self_9),
comment: ::core::clone::Clone::clone(__self_10),
with_no_schema_binding: ::core::clone::Clone::clone(__self_11),
if_not_exists: ::core::clone::Clone::clone(__self_12),
temporary: ::core::clone::Clone::clone(__self_13),
to: ::core::clone::Clone::clone(__self_14),
params: ::core::clone::Clone::clone(__self_15),
},
Statement::CreateTable(__self_0) =>
Statement::CreateTable(::core::clone::Clone::clone(__self_0)),
Statement::CreateVirtualTable {
name: __self_0,
if_not_exists: __self_1,
module_name: __self_2,
module_args: __self_3 } =>
Statement::CreateVirtualTable {
name: ::core::clone::Clone::clone(__self_0),
if_not_exists: ::core::clone::Clone::clone(__self_1),
module_name: ::core::clone::Clone::clone(__self_2),
module_args: ::core::clone::Clone::clone(__self_3),
},
Statement::CreateIndex(__self_0) =>
Statement::CreateIndex(::core::clone::Clone::clone(__self_0)),
Statement::CreateRole {
names: __self_0,
if_not_exists: __self_1,
login: __self_2,
inherit: __self_3,
bypassrls: __self_4,
password: __self_5,
superuser: __self_6,
create_db: __self_7,
create_role: __self_8,
replication: __self_9,
connection_limit: __self_10,
valid_until: __self_11,
in_role: __self_12,
in_group: __self_13,
role: __self_14,
user: __self_15,
admin: __self_16,
authorization_owner: __self_17 } =>
Statement::CreateRole {
names: ::core::clone::Clone::clone(__self_0),
if_not_exists: ::core::clone::Clone::clone(__self_1),
login: ::core::clone::Clone::clone(__self_2),
inherit: ::core::clone::Clone::clone(__self_3),
bypassrls: ::core::clone::Clone::clone(__self_4),
password: ::core::clone::Clone::clone(__self_5),
superuser: ::core::clone::Clone::clone(__self_6),
create_db: ::core::clone::Clone::clone(__self_7),
create_role: ::core::clone::Clone::clone(__self_8),
replication: ::core::clone::Clone::clone(__self_9),
connection_limit: ::core::clone::Clone::clone(__self_10),
valid_until: ::core::clone::Clone::clone(__self_11),
in_role: ::core::clone::Clone::clone(__self_12),
in_group: ::core::clone::Clone::clone(__self_13),
role: ::core::clone::Clone::clone(__self_14),
user: ::core::clone::Clone::clone(__self_15),
admin: ::core::clone::Clone::clone(__self_16),
authorization_owner: ::core::clone::Clone::clone(__self_17),
},
Statement::CreateSecret {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
storage_specifier: __self_4,
secret_type: __self_5,
options: __self_6 } =>
Statement::CreateSecret {
or_replace: ::core::clone::Clone::clone(__self_0),
temporary: ::core::clone::Clone::clone(__self_1),
if_not_exists: ::core::clone::Clone::clone(__self_2),
name: ::core::clone::Clone::clone(__self_3),
storage_specifier: ::core::clone::Clone::clone(__self_4),
secret_type: ::core::clone::Clone::clone(__self_5),
options: ::core::clone::Clone::clone(__self_6),
},
Statement::CreateServer(__self_0) =>
Statement::CreateServer(::core::clone::Clone::clone(__self_0)),
Statement::CreatePolicy {
name: __self_0,
table_name: __self_1,
policy_type: __self_2,
command: __self_3,
to: __self_4,
using: __self_5,
with_check: __self_6 } =>
Statement::CreatePolicy {
name: ::core::clone::Clone::clone(__self_0),
table_name: ::core::clone::Clone::clone(__self_1),
policy_type: ::core::clone::Clone::clone(__self_2),
command: ::core::clone::Clone::clone(__self_3),
to: ::core::clone::Clone::clone(__self_4),
using: ::core::clone::Clone::clone(__self_5),
with_check: ::core::clone::Clone::clone(__self_6),
},
Statement::CreateConnector(__self_0) =>
Statement::CreateConnector(::core::clone::Clone::clone(__self_0)),
Statement::AlterTable {
name: __self_0,
if_exists: __self_1,
only: __self_2,
operations: __self_3,
location: __self_4,
on_cluster: __self_5,
iceberg: __self_6,
end_token: __self_7 } =>
Statement::AlterTable {
name: ::core::clone::Clone::clone(__self_0),
if_exists: ::core::clone::Clone::clone(__self_1),
only: ::core::clone::Clone::clone(__self_2),
operations: ::core::clone::Clone::clone(__self_3),
location: ::core::clone::Clone::clone(__self_4),
on_cluster: ::core::clone::Clone::clone(__self_5),
iceberg: ::core::clone::Clone::clone(__self_6),
end_token: ::core::clone::Clone::clone(__self_7),
},
Statement::AlterSchema(__self_0) =>
Statement::AlterSchema(::core::clone::Clone::clone(__self_0)),
Statement::AlterIndex { name: __self_0, operation: __self_1 } =>
Statement::AlterIndex {
name: ::core::clone::Clone::clone(__self_0),
operation: ::core::clone::Clone::clone(__self_1),
},
Statement::AlterView {
name: __self_0,
columns: __self_1,
query: __self_2,
with_options: __self_3 } =>
Statement::AlterView {
name: ::core::clone::Clone::clone(__self_0),
columns: ::core::clone::Clone::clone(__self_1),
query: ::core::clone::Clone::clone(__self_2),
with_options: ::core::clone::Clone::clone(__self_3),
},
Statement::AlterType(__self_0) =>
Statement::AlterType(::core::clone::Clone::clone(__self_0)),
Statement::AlterRole { name: __self_0, operation: __self_1 } =>
Statement::AlterRole {
name: ::core::clone::Clone::clone(__self_0),
operation: ::core::clone::Clone::clone(__self_1),
},
Statement::AlterPolicy {
name: __self_0, table_name: __self_1, operation: __self_2 } =>
Statement::AlterPolicy {
name: ::core::clone::Clone::clone(__self_0),
table_name: ::core::clone::Clone::clone(__self_1),
operation: ::core::clone::Clone::clone(__self_2),
},
Statement::AlterConnector {
name: __self_0,
properties: __self_1,
url: __self_2,
owner: __self_3 } =>
Statement::AlterConnector {
name: ::core::clone::Clone::clone(__self_0),
properties: ::core::clone::Clone::clone(__self_1),
url: ::core::clone::Clone::clone(__self_2),
owner: ::core::clone::Clone::clone(__self_3),
},
Statement::AlterSession { set: __self_0, session_params: __self_1
} =>
Statement::AlterSession {
set: ::core::clone::Clone::clone(__self_0),
session_params: ::core::clone::Clone::clone(__self_1),
},
Statement::AttachDatabase {
schema_name: __self_0,
database_file_name: __self_1,
database: __self_2 } =>
Statement::AttachDatabase {
schema_name: ::core::clone::Clone::clone(__self_0),
database_file_name: ::core::clone::Clone::clone(__self_1),
database: ::core::clone::Clone::clone(__self_2),
},
Statement::AttachDuckDBDatabase {
if_not_exists: __self_0,
database: __self_1,
database_path: __self_2,
database_alias: __self_3,
attach_options: __self_4 } =>
Statement::AttachDuckDBDatabase {
if_not_exists: ::core::clone::Clone::clone(__self_0),
database: ::core::clone::Clone::clone(__self_1),
database_path: ::core::clone::Clone::clone(__self_2),
database_alias: ::core::clone::Clone::clone(__self_3),
attach_options: ::core::clone::Clone::clone(__self_4),
},
Statement::DetachDuckDBDatabase {
if_exists: __self_0,
database: __self_1,
database_alias: __self_2 } =>
Statement::DetachDuckDBDatabase {
if_exists: ::core::clone::Clone::clone(__self_0),
database: ::core::clone::Clone::clone(__self_1),
database_alias: ::core::clone::Clone::clone(__self_2),
},
Statement::Drop {
object_type: __self_0,
if_exists: __self_1,
names: __self_2,
cascade: __self_3,
restrict: __self_4,
purge: __self_5,
temporary: __self_6,
table: __self_7 } =>
Statement::Drop {
object_type: ::core::clone::Clone::clone(__self_0),
if_exists: ::core::clone::Clone::clone(__self_1),
names: ::core::clone::Clone::clone(__self_2),
cascade: ::core::clone::Clone::clone(__self_3),
restrict: ::core::clone::Clone::clone(__self_4),
purge: ::core::clone::Clone::clone(__self_5),
temporary: ::core::clone::Clone::clone(__self_6),
table: ::core::clone::Clone::clone(__self_7),
},
Statement::DropFunction {
if_exists: __self_0,
func_desc: __self_1,
drop_behavior: __self_2 } =>
Statement::DropFunction {
if_exists: ::core::clone::Clone::clone(__self_0),
func_desc: ::core::clone::Clone::clone(__self_1),
drop_behavior: ::core::clone::Clone::clone(__self_2),
},
Statement::DropDomain(__self_0) =>
Statement::DropDomain(::core::clone::Clone::clone(__self_0)),
Statement::DropProcedure {
if_exists: __self_0,
proc_desc: __self_1,
drop_behavior: __self_2 } =>
Statement::DropProcedure {
if_exists: ::core::clone::Clone::clone(__self_0),
proc_desc: ::core::clone::Clone::clone(__self_1),
drop_behavior: ::core::clone::Clone::clone(__self_2),
},
Statement::DropSecret {
if_exists: __self_0,
temporary: __self_1,
name: __self_2,
storage_specifier: __self_3 } =>
Statement::DropSecret {
if_exists: ::core::clone::Clone::clone(__self_0),
temporary: ::core::clone::Clone::clone(__self_1),
name: ::core::clone::Clone::clone(__self_2),
storage_specifier: ::core::clone::Clone::clone(__self_3),
},
Statement::DropPolicy {
if_exists: __self_0,
name: __self_1,
table_name: __self_2,
drop_behavior: __self_3 } =>
Statement::DropPolicy {
if_exists: ::core::clone::Clone::clone(__self_0),
name: ::core::clone::Clone::clone(__self_1),
table_name: ::core::clone::Clone::clone(__self_2),
drop_behavior: ::core::clone::Clone::clone(__self_3),
},
Statement::DropConnector { if_exists: __self_0, name: __self_1 }
=>
Statement::DropConnector {
if_exists: ::core::clone::Clone::clone(__self_0),
name: ::core::clone::Clone::clone(__self_1),
},
Statement::Declare { stmts: __self_0 } =>
Statement::Declare {
stmts: ::core::clone::Clone::clone(__self_0),
},
Statement::CreateExtension {
name: __self_0,
if_not_exists: __self_1,
cascade: __self_2,
schema: __self_3,
version: __self_4 } =>
Statement::CreateExtension {
name: ::core::clone::Clone::clone(__self_0),
if_not_exists: ::core::clone::Clone::clone(__self_1),
cascade: ::core::clone::Clone::clone(__self_2),
schema: ::core::clone::Clone::clone(__self_3),
version: ::core::clone::Clone::clone(__self_4),
},
Statement::DropExtension {
names: __self_0,
if_exists: __self_1,
cascade_or_restrict: __self_2 } =>
Statement::DropExtension {
names: ::core::clone::Clone::clone(__self_0),
if_exists: ::core::clone::Clone::clone(__self_1),
cascade_or_restrict: ::core::clone::Clone::clone(__self_2),
},
Statement::Fetch {
name: __self_0,
direction: __self_1,
position: __self_2,
into: __self_3 } =>
Statement::Fetch {
name: ::core::clone::Clone::clone(__self_0),
direction: ::core::clone::Clone::clone(__self_1),
position: ::core::clone::Clone::clone(__self_2),
into: ::core::clone::Clone::clone(__self_3),
},
Statement::Flush {
object_type: __self_0,
location: __self_1,
channel: __self_2,
read_lock: __self_3,
export: __self_4,
tables: __self_5 } =>
Statement::Flush {
object_type: ::core::clone::Clone::clone(__self_0),
location: ::core::clone::Clone::clone(__self_1),
channel: ::core::clone::Clone::clone(__self_2),
read_lock: ::core::clone::Clone::clone(__self_3),
export: ::core::clone::Clone::clone(__self_4),
tables: ::core::clone::Clone::clone(__self_5),
},
Statement::Discard { object_type: __self_0 } =>
Statement::Discard {
object_type: ::core::clone::Clone::clone(__self_0),
},
Statement::ShowFunctions { filter: __self_0 } =>
Statement::ShowFunctions {
filter: ::core::clone::Clone::clone(__self_0),
},
Statement::ShowVariable { variable: __self_0 } =>
Statement::ShowVariable {
variable: ::core::clone::Clone::clone(__self_0),
},
Statement::ShowStatus {
filter: __self_0, global: __self_1, session: __self_2 } =>
Statement::ShowStatus {
filter: ::core::clone::Clone::clone(__self_0),
global: ::core::clone::Clone::clone(__self_1),
session: ::core::clone::Clone::clone(__self_2),
},
Statement::ShowVariables {
filter: __self_0, global: __self_1, session: __self_2 } =>
Statement::ShowVariables {
filter: ::core::clone::Clone::clone(__self_0),
global: ::core::clone::Clone::clone(__self_1),
session: ::core::clone::Clone::clone(__self_2),
},
Statement::ShowCreate { obj_type: __self_0, obj_name: __self_1 }
=>
Statement::ShowCreate {
obj_type: ::core::clone::Clone::clone(__self_0),
obj_name: ::core::clone::Clone::clone(__self_1),
},
Statement::ShowColumns {
extended: __self_0, full: __self_1, show_options: __self_2 }
=>
Statement::ShowColumns {
extended: ::core::clone::Clone::clone(__self_0),
full: ::core::clone::Clone::clone(__self_1),
show_options: ::core::clone::Clone::clone(__self_2),
},
Statement::ShowDatabases {
terse: __self_0, history: __self_1, show_options: __self_2 }
=>
Statement::ShowDatabases {
terse: ::core::clone::Clone::clone(__self_0),
history: ::core::clone::Clone::clone(__self_1),
show_options: ::core::clone::Clone::clone(__self_2),
},
Statement::ShowSchemas {
terse: __self_0, history: __self_1, show_options: __self_2 }
=>
Statement::ShowSchemas {
terse: ::core::clone::Clone::clone(__self_0),
history: ::core::clone::Clone::clone(__self_1),
show_options: ::core::clone::Clone::clone(__self_2),
},
Statement::ShowCharset(__self_0) =>
Statement::ShowCharset(::core::clone::Clone::clone(__self_0)),
Statement::ShowObjects(__self_0) =>
Statement::ShowObjects(::core::clone::Clone::clone(__self_0)),
Statement::ShowTables {
terse: __self_0,
history: __self_1,
extended: __self_2,
full: __self_3,
external: __self_4,
show_options: __self_5 } =>
Statement::ShowTables {
terse: ::core::clone::Clone::clone(__self_0),
history: ::core::clone::Clone::clone(__self_1),
extended: ::core::clone::Clone::clone(__self_2),
full: ::core::clone::Clone::clone(__self_3),
external: ::core::clone::Clone::clone(__self_4),
show_options: ::core::clone::Clone::clone(__self_5),
},
Statement::ShowViews {
terse: __self_0,
materialized: __self_1,
show_options: __self_2 } =>
Statement::ShowViews {
terse: ::core::clone::Clone::clone(__self_0),
materialized: ::core::clone::Clone::clone(__self_1),
show_options: ::core::clone::Clone::clone(__self_2),
},
Statement::ShowCollation { filter: __self_0 } =>
Statement::ShowCollation {
filter: ::core::clone::Clone::clone(__self_0),
},
Statement::Use(__self_0) =>
Statement::Use(::core::clone::Clone::clone(__self_0)),
Statement::StartTransaction {
modes: __self_0,
begin: __self_1,
transaction: __self_2,
modifier: __self_3,
statements: __self_4,
exception: __self_5,
has_end_keyword: __self_6 } =>
Statement::StartTransaction {
modes: ::core::clone::Clone::clone(__self_0),
begin: ::core::clone::Clone::clone(__self_1),
transaction: ::core::clone::Clone::clone(__self_2),
modifier: ::core::clone::Clone::clone(__self_3),
statements: ::core::clone::Clone::clone(__self_4),
exception: ::core::clone::Clone::clone(__self_5),
has_end_keyword: ::core::clone::Clone::clone(__self_6),
},
Statement::Comment {
object_type: __self_0,
object_name: __self_1,
comment: __self_2,
if_exists: __self_3 } =>
Statement::Comment {
object_type: ::core::clone::Clone::clone(__self_0),
object_name: ::core::clone::Clone::clone(__self_1),
comment: ::core::clone::Clone::clone(__self_2),
if_exists: ::core::clone::Clone::clone(__self_3),
},
Statement::Commit {
chain: __self_0, end: __self_1, modifier: __self_2 } =>
Statement::Commit {
chain: ::core::clone::Clone::clone(__self_0),
end: ::core::clone::Clone::clone(__self_1),
modifier: ::core::clone::Clone::clone(__self_2),
},
Statement::Rollback { chain: __self_0, savepoint: __self_1 } =>
Statement::Rollback {
chain: ::core::clone::Clone::clone(__self_0),
savepoint: ::core::clone::Clone::clone(__self_1),
},
Statement::CreateSchema {
schema_name: __self_0,
if_not_exists: __self_1,
with: __self_2,
options: __self_3,
default_collate_spec: __self_4,
clone: __self_5 } =>
Statement::CreateSchema {
schema_name: ::core::clone::Clone::clone(__self_0),
if_not_exists: ::core::clone::Clone::clone(__self_1),
with: ::core::clone::Clone::clone(__self_2),
options: ::core::clone::Clone::clone(__self_3),
default_collate_spec: ::core::clone::Clone::clone(__self_4),
clone: ::core::clone::Clone::clone(__self_5),
},
Statement::CreateDatabase {
db_name: __self_0,
if_not_exists: __self_1,
location: __self_2,
managed_location: __self_3,
or_replace: __self_4,
transient: __self_5,
clone: __self_6,
data_retention_time_in_days: __self_7,
max_data_extension_time_in_days: __self_8,
external_volume: __self_9,
catalog: __self_10,
replace_invalid_characters: __self_11,
default_ddl_collation: __self_12,
storage_serialization_policy: __self_13,
comment: __self_14,
catalog_sync: __self_15,
catalog_sync_namespace_mode: __self_16,
catalog_sync_namespace_flatten_delimiter: __self_17,
with_tags: __self_18,
with_contacts: __self_19 } =>
Statement::CreateDatabase {
db_name: ::core::clone::Clone::clone(__self_0),
if_not_exists: ::core::clone::Clone::clone(__self_1),
location: ::core::clone::Clone::clone(__self_2),
managed_location: ::core::clone::Clone::clone(__self_3),
or_replace: ::core::clone::Clone::clone(__self_4),
transient: ::core::clone::Clone::clone(__self_5),
clone: ::core::clone::Clone::clone(__self_6),
data_retention_time_in_days: ::core::clone::Clone::clone(__self_7),
max_data_extension_time_in_days: ::core::clone::Clone::clone(__self_8),
external_volume: ::core::clone::Clone::clone(__self_9),
catalog: ::core::clone::Clone::clone(__self_10),
replace_invalid_characters: ::core::clone::Clone::clone(__self_11),
default_ddl_collation: ::core::clone::Clone::clone(__self_12),
storage_serialization_policy: ::core::clone::Clone::clone(__self_13),
comment: ::core::clone::Clone::clone(__self_14),
catalog_sync: ::core::clone::Clone::clone(__self_15),
catalog_sync_namespace_mode: ::core::clone::Clone::clone(__self_16),
catalog_sync_namespace_flatten_delimiter: ::core::clone::Clone::clone(__self_17),
with_tags: ::core::clone::Clone::clone(__self_18),
with_contacts: ::core::clone::Clone::clone(__self_19),
},
Statement::CreateFunction(__self_0) =>
Statement::CreateFunction(::core::clone::Clone::clone(__self_0)),
Statement::CreateTrigger(__self_0) =>
Statement::CreateTrigger(::core::clone::Clone::clone(__self_0)),
Statement::DropTrigger(__self_0) =>
Statement::DropTrigger(::core::clone::Clone::clone(__self_0)),
Statement::CreateProcedure {
or_alter: __self_0,
name: __self_1,
params: __self_2,
language: __self_3,
body: __self_4 } =>
Statement::CreateProcedure {
or_alter: ::core::clone::Clone::clone(__self_0),
name: ::core::clone::Clone::clone(__self_1),
params: ::core::clone::Clone::clone(__self_2),
language: ::core::clone::Clone::clone(__self_3),
body: ::core::clone::Clone::clone(__self_4),
},
Statement::CreateMacro {
or_replace: __self_0,
temporary: __self_1,
name: __self_2,
args: __self_3,
definition: __self_4 } =>
Statement::CreateMacro {
or_replace: ::core::clone::Clone::clone(__self_0),
temporary: ::core::clone::Clone::clone(__self_1),
name: ::core::clone::Clone::clone(__self_2),
args: ::core::clone::Clone::clone(__self_3),
definition: ::core::clone::Clone::clone(__self_4),
},
Statement::CreateStage {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
stage_params: __self_4,
directory_table_params: __self_5,
file_format: __self_6,
copy_options: __self_7,
comment: __self_8 } =>
Statement::CreateStage {
or_replace: ::core::clone::Clone::clone(__self_0),
temporary: ::core::clone::Clone::clone(__self_1),
if_not_exists: ::core::clone::Clone::clone(__self_2),
name: ::core::clone::Clone::clone(__self_3),
stage_params: ::core::clone::Clone::clone(__self_4),
directory_table_params: ::core::clone::Clone::clone(__self_5),
file_format: ::core::clone::Clone::clone(__self_6),
copy_options: ::core::clone::Clone::clone(__self_7),
comment: ::core::clone::Clone::clone(__self_8),
},
Statement::Assert { condition: __self_0, message: __self_1 } =>
Statement::Assert {
condition: ::core::clone::Clone::clone(__self_0),
message: ::core::clone::Clone::clone(__self_1),
},
Statement::Grant {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
with_grant_option: __self_3,
as_grantor: __self_4,
granted_by: __self_5,
current_grants: __self_6 } =>
Statement::Grant {
privileges: ::core::clone::Clone::clone(__self_0),
objects: ::core::clone::Clone::clone(__self_1),
grantees: ::core::clone::Clone::clone(__self_2),
with_grant_option: ::core::clone::Clone::clone(__self_3),
as_grantor: ::core::clone::Clone::clone(__self_4),
granted_by: ::core::clone::Clone::clone(__self_5),
current_grants: ::core::clone::Clone::clone(__self_6),
},
Statement::Deny(__self_0) =>
Statement::Deny(::core::clone::Clone::clone(__self_0)),
Statement::Revoke {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
granted_by: __self_3,
cascade: __self_4 } =>
Statement::Revoke {
privileges: ::core::clone::Clone::clone(__self_0),
objects: ::core::clone::Clone::clone(__self_1),
grantees: ::core::clone::Clone::clone(__self_2),
granted_by: ::core::clone::Clone::clone(__self_3),
cascade: ::core::clone::Clone::clone(__self_4),
},
Statement::Deallocate { name: __self_0, prepare: __self_1 } =>
Statement::Deallocate {
name: ::core::clone::Clone::clone(__self_0),
prepare: ::core::clone::Clone::clone(__self_1),
},
Statement::Execute {
name: __self_0,
parameters: __self_1,
has_parentheses: __self_2,
immediate: __self_3,
into: __self_4,
using: __self_5,
output: __self_6,
default: __self_7 } =>
Statement::Execute {
name: ::core::clone::Clone::clone(__self_0),
parameters: ::core::clone::Clone::clone(__self_1),
has_parentheses: ::core::clone::Clone::clone(__self_2),
immediate: ::core::clone::Clone::clone(__self_3),
into: ::core::clone::Clone::clone(__self_4),
using: ::core::clone::Clone::clone(__self_5),
output: ::core::clone::Clone::clone(__self_6),
default: ::core::clone::Clone::clone(__self_7),
},
Statement::Prepare {
name: __self_0, data_types: __self_1, statement: __self_2 } =>
Statement::Prepare {
name: ::core::clone::Clone::clone(__self_0),
data_types: ::core::clone::Clone::clone(__self_1),
statement: ::core::clone::Clone::clone(__self_2),
},
Statement::Kill { modifier: __self_0, id: __self_1 } =>
Statement::Kill {
modifier: ::core::clone::Clone::clone(__self_0),
id: ::core::clone::Clone::clone(__self_1),
},
Statement::ExplainTable {
describe_alias: __self_0,
hive_format: __self_1,
has_table_keyword: __self_2,
table_name: __self_3 } =>
Statement::ExplainTable {
describe_alias: ::core::clone::Clone::clone(__self_0),
hive_format: ::core::clone::Clone::clone(__self_1),
has_table_keyword: ::core::clone::Clone::clone(__self_2),
table_name: ::core::clone::Clone::clone(__self_3),
},
Statement::Explain {
describe_alias: __self_0,
analyze: __self_1,
verbose: __self_2,
query_plan: __self_3,
estimate: __self_4,
statement: __self_5,
format: __self_6,
options: __self_7 } =>
Statement::Explain {
describe_alias: ::core::clone::Clone::clone(__self_0),
analyze: ::core::clone::Clone::clone(__self_1),
verbose: ::core::clone::Clone::clone(__self_2),
query_plan: ::core::clone::Clone::clone(__self_3),
estimate: ::core::clone::Clone::clone(__self_4),
statement: ::core::clone::Clone::clone(__self_5),
format: ::core::clone::Clone::clone(__self_6),
options: ::core::clone::Clone::clone(__self_7),
},
Statement::Savepoint { name: __self_0 } =>
Statement::Savepoint {
name: ::core::clone::Clone::clone(__self_0),
},
Statement::ReleaseSavepoint { name: __self_0 } =>
Statement::ReleaseSavepoint {
name: ::core::clone::Clone::clone(__self_0),
},
Statement::Merge {
into: __self_0,
table: __self_1,
source: __self_2,
on: __self_3,
clauses: __self_4,
output: __self_5 } =>
Statement::Merge {
into: ::core::clone::Clone::clone(__self_0),
table: ::core::clone::Clone::clone(__self_1),
source: ::core::clone::Clone::clone(__self_2),
on: ::core::clone::Clone::clone(__self_3),
clauses: ::core::clone::Clone::clone(__self_4),
output: ::core::clone::Clone::clone(__self_5),
},
Statement::Cache {
table_flag: __self_0,
table_name: __self_1,
has_as: __self_2,
options: __self_3,
query: __self_4 } =>
Statement::Cache {
table_flag: ::core::clone::Clone::clone(__self_0),
table_name: ::core::clone::Clone::clone(__self_1),
has_as: ::core::clone::Clone::clone(__self_2),
options: ::core::clone::Clone::clone(__self_3),
query: ::core::clone::Clone::clone(__self_4),
},
Statement::UNCache { table_name: __self_0, if_exists: __self_1 }
=>
Statement::UNCache {
table_name: ::core::clone::Clone::clone(__self_0),
if_exists: ::core::clone::Clone::clone(__self_1),
},
Statement::CreateSequence {
temporary: __self_0,
if_not_exists: __self_1,
name: __self_2,
data_type: __self_3,
sequence_options: __self_4,
owned_by: __self_5 } =>
Statement::CreateSequence {
temporary: ::core::clone::Clone::clone(__self_0),
if_not_exists: ::core::clone::Clone::clone(__self_1),
name: ::core::clone::Clone::clone(__self_2),
data_type: ::core::clone::Clone::clone(__self_3),
sequence_options: ::core::clone::Clone::clone(__self_4),
owned_by: ::core::clone::Clone::clone(__self_5),
},
Statement::CreateDomain(__self_0) =>
Statement::CreateDomain(::core::clone::Clone::clone(__self_0)),
Statement::CreateType { name: __self_0, representation: __self_1 }
=>
Statement::CreateType {
name: ::core::clone::Clone::clone(__self_0),
representation: ::core::clone::Clone::clone(__self_1),
},
Statement::Pragma {
name: __self_0, value: __self_1, is_eq: __self_2 } =>
Statement::Pragma {
name: ::core::clone::Clone::clone(__self_0),
value: ::core::clone::Clone::clone(__self_1),
is_eq: ::core::clone::Clone::clone(__self_2),
},
Statement::LockTables { tables: __self_0 } =>
Statement::LockTables {
tables: ::core::clone::Clone::clone(__self_0),
},
Statement::UnlockTables => Statement::UnlockTables,
Statement::Unload {
query: __self_0,
query_text: __self_1,
to: __self_2,
auth: __self_3,
with: __self_4,
options: __self_5 } =>
Statement::Unload {
query: ::core::clone::Clone::clone(__self_0),
query_text: ::core::clone::Clone::clone(__self_1),
to: ::core::clone::Clone::clone(__self_2),
auth: ::core::clone::Clone::clone(__self_3),
with: ::core::clone::Clone::clone(__self_4),
options: ::core::clone::Clone::clone(__self_5),
},
Statement::OptimizeTable {
name: __self_0,
on_cluster: __self_1,
partition: __self_2,
include_final: __self_3,
deduplicate: __self_4 } =>
Statement::OptimizeTable {
name: ::core::clone::Clone::clone(__self_0),
on_cluster: ::core::clone::Clone::clone(__self_1),
partition: ::core::clone::Clone::clone(__self_2),
include_final: ::core::clone::Clone::clone(__self_3),
deduplicate: ::core::clone::Clone::clone(__self_4),
},
Statement::LISTEN { channel: __self_0 } =>
Statement::LISTEN {
channel: ::core::clone::Clone::clone(__self_0),
},
Statement::UNLISTEN { channel: __self_0 } =>
Statement::UNLISTEN {
channel: ::core::clone::Clone::clone(__self_0),
},
Statement::NOTIFY { channel: __self_0, payload: __self_1 } =>
Statement::NOTIFY {
channel: ::core::clone::Clone::clone(__self_0),
payload: ::core::clone::Clone::clone(__self_1),
},
Statement::LoadData {
local: __self_0,
inpath: __self_1,
overwrite: __self_2,
table_name: __self_3,
partitioned: __self_4,
table_format: __self_5 } =>
Statement::LoadData {
local: ::core::clone::Clone::clone(__self_0),
inpath: ::core::clone::Clone::clone(__self_1),
overwrite: ::core::clone::Clone::clone(__self_2),
table_name: ::core::clone::Clone::clone(__self_3),
partitioned: ::core::clone::Clone::clone(__self_4),
table_format: ::core::clone::Clone::clone(__self_5),
},
Statement::RenameTable(__self_0) =>
Statement::RenameTable(::core::clone::Clone::clone(__self_0)),
Statement::List(__self_0) =>
Statement::List(::core::clone::Clone::clone(__self_0)),
Statement::Remove(__self_0) =>
Statement::Remove(::core::clone::Clone::clone(__self_0)),
Statement::RaisError {
message: __self_0,
severity: __self_1,
state: __self_2,
arguments: __self_3,
options: __self_4 } =>
Statement::RaisError {
message: ::core::clone::Clone::clone(__self_0),
severity: ::core::clone::Clone::clone(__self_1),
state: ::core::clone::Clone::clone(__self_2),
arguments: ::core::clone::Clone::clone(__self_3),
options: ::core::clone::Clone::clone(__self_4),
},
Statement::Print(__self_0) =>
Statement::Print(::core::clone::Clone::clone(__self_0)),
Statement::Return(__self_0) =>
Statement::Return(::core::clone::Clone::clone(__self_0)),
Statement::ExportData(__self_0) =>
Statement::ExportData(::core::clone::Clone::clone(__self_0)),
Statement::CreateUser(__self_0) =>
Statement::CreateUser(::core::clone::Clone::clone(__self_0)),
Statement::Vacuum(__self_0) =>
Statement::Vacuum(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::PartialEq for Statement {
#[inline]
fn eq(&self, other: &Statement) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Statement::Analyze {
table_name: __self_0,
partitions: __self_1,
for_columns: __self_2,
columns: __self_3,
cache_metadata: __self_4,
noscan: __self_5,
compute_statistics: __self_6,
has_table_keyword: __self_7 }, Statement::Analyze {
table_name: __arg1_0,
partitions: __arg1_1,
for_columns: __arg1_2,
columns: __arg1_3,
cache_metadata: __arg1_4,
noscan: __arg1_5,
compute_statistics: __arg1_6,
has_table_keyword: __arg1_7 }) =>
__self_2 == __arg1_2 && __self_4 == __arg1_4 &&
__self_5 == __arg1_5 && __self_6 == __arg1_6 &&
__self_7 == __arg1_7 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_3 == __arg1_3,
(Statement::Set(__self_0), Statement::Set(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Truncate {
table_names: __self_0,
partitions: __self_1,
table: __self_2,
identity: __self_3,
cascade: __self_4,
on_cluster: __self_5 }, Statement::Truncate {
table_names: __arg1_0,
partitions: __arg1_1,
table: __arg1_2,
identity: __arg1_3,
cascade: __arg1_4,
on_cluster: __arg1_5 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::Msck {
table_name: __self_0,
repair: __self_1,
partition_action: __self_2 }, Statement::Msck {
table_name: __arg1_0,
repair: __arg1_1,
partition_action: __arg1_2 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2,
(Statement::Query(__self_0), Statement::Query(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Insert(__self_0), Statement::Insert(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Install { extension_name: __self_0 },
Statement::Install { extension_name: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::Load { extension_name: __self_0 },
Statement::Load { extension_name: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::Directory {
overwrite: __self_0,
local: __self_1,
path: __self_2,
file_format: __self_3,
source: __self_4 }, Statement::Directory {
overwrite: __arg1_0,
local: __arg1_1,
path: __arg1_2,
file_format: __arg1_3,
source: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::Case(__self_0), Statement::Case(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::If(__self_0), Statement::If(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::While(__self_0), Statement::While(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Raise(__self_0), Statement::Raise(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Call(__self_0), Statement::Call(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Copy {
source: __self_0,
to: __self_1,
target: __self_2,
options: __self_3,
legacy_options: __self_4,
values: __self_5 }, Statement::Copy {
source: __arg1_0,
to: __arg1_1,
target: __arg1_2,
options: __arg1_3,
legacy_options: __arg1_4,
values: __arg1_5 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::CopyIntoSnowflake {
kind: __self_0,
into: __self_1,
into_columns: __self_2,
from_obj: __self_3,
from_obj_alias: __self_4,
stage_params: __self_5,
from_transformations: __self_6,
from_query: __self_7,
files: __self_8,
pattern: __self_9,
file_format: __self_10,
copy_options: __self_11,
validation_mode: __self_12,
partition: __self_13 }, Statement::CopyIntoSnowflake {
kind: __arg1_0,
into: __arg1_1,
into_columns: __arg1_2,
from_obj: __arg1_3,
from_obj_alias: __arg1_4,
stage_params: __arg1_5,
from_transformations: __arg1_6,
from_query: __arg1_7,
files: __arg1_8,
pattern: __arg1_9,
file_format: __arg1_10,
copy_options: __arg1_11,
validation_mode: __arg1_12,
partition: __arg1_13 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6 && __self_7 == __arg1_7 &&
__self_8 == __arg1_8 && __self_9 == __arg1_9 &&
__self_10 == __arg1_10 && __self_11 == __arg1_11 &&
__self_12 == __arg1_12 && __self_13 == __arg1_13,
(Statement::Open(__self_0), Statement::Open(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Close { cursor: __self_0 }, Statement::Close {
cursor: __arg1_0 }) => __self_0 == __arg1_0,
(Statement::Update {
table: __self_0,
assignments: __self_1,
from: __self_2,
selection: __self_3,
returning: __self_4,
or: __self_5,
limit: __self_6 }, Statement::Update {
table: __arg1_0,
assignments: __arg1_1,
from: __arg1_2,
selection: __arg1_3,
returning: __arg1_4,
or: __arg1_5,
limit: __arg1_6 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6,
(Statement::Delete(__self_0), Statement::Delete(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::CreateView {
or_alter: __self_0,
or_replace: __self_1,
materialized: __self_2,
secure: __self_3,
name: __self_4,
name_before_not_exists: __self_5,
columns: __self_6,
query: __self_7,
options: __self_8,
cluster_by: __self_9,
comment: __self_10,
with_no_schema_binding: __self_11,
if_not_exists: __self_12,
temporary: __self_13,
to: __self_14,
params: __self_15 }, Statement::CreateView {
or_alter: __arg1_0,
or_replace: __arg1_1,
materialized: __arg1_2,
secure: __arg1_3,
name: __arg1_4,
name_before_not_exists: __arg1_5,
columns: __arg1_6,
query: __arg1_7,
options: __arg1_8,
cluster_by: __arg1_9,
comment: __arg1_10,
with_no_schema_binding: __arg1_11,
if_not_exists: __arg1_12,
temporary: __arg1_13,
to: __arg1_14,
params: __arg1_15 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_5 == __arg1_5 && __self_11 == __arg1_11 &&
__self_12 == __arg1_12 && __self_13 == __arg1_13 &&
__self_4 == __arg1_4 && __self_6 == __arg1_6 &&
__self_7 == __arg1_7 && __self_8 == __arg1_8 &&
__self_9 == __arg1_9 && __self_10 == __arg1_10 &&
__self_14 == __arg1_14 && __self_15 == __arg1_15,
(Statement::CreateTable(__self_0),
Statement::CreateTable(__arg1_0)) => __self_0 == __arg1_0,
(Statement::CreateVirtualTable {
name: __self_0,
if_not_exists: __self_1,
module_name: __self_2,
module_args: __self_3 }, Statement::CreateVirtualTable {
name: __arg1_0,
if_not_exists: __arg1_1,
module_name: __arg1_2,
module_args: __arg1_3 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Statement::CreateIndex(__self_0),
Statement::CreateIndex(__arg1_0)) => __self_0 == __arg1_0,
(Statement::CreateRole {
names: __self_0,
if_not_exists: __self_1,
login: __self_2,
inherit: __self_3,
bypassrls: __self_4,
password: __self_5,
superuser: __self_6,
create_db: __self_7,
create_role: __self_8,
replication: __self_9,
connection_limit: __self_10,
valid_until: __self_11,
in_role: __self_12,
in_group: __self_13,
role: __self_14,
user: __self_15,
admin: __self_16,
authorization_owner: __self_17 }, Statement::CreateRole {
names: __arg1_0,
if_not_exists: __arg1_1,
login: __arg1_2,
inherit: __arg1_3,
bypassrls: __arg1_4,
password: __arg1_5,
superuser: __arg1_6,
create_db: __arg1_7,
create_role: __arg1_8,
replication: __arg1_9,
connection_limit: __arg1_10,
valid_until: __arg1_11,
in_role: __arg1_12,
in_group: __arg1_13,
role: __arg1_14,
user: __arg1_15,
admin: __arg1_16,
authorization_owner: __arg1_17 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6 && __self_7 == __arg1_7 &&
__self_8 == __arg1_8 && __self_9 == __arg1_9 &&
__self_10 == __arg1_10 && __self_11 == __arg1_11 &&
__self_12 == __arg1_12 && __self_13 == __arg1_13 &&
__self_14 == __arg1_14 && __self_15 == __arg1_15 &&
__self_16 == __arg1_16 && __self_17 == __arg1_17,
(Statement::CreateSecret {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
storage_specifier: __self_4,
secret_type: __self_5,
options: __self_6 }, Statement::CreateSecret {
or_replace: __arg1_0,
temporary: __arg1_1,
if_not_exists: __arg1_2,
name: __arg1_3,
storage_specifier: __arg1_4,
secret_type: __arg1_5,
options: __arg1_6 }) =>
__self_0 == __arg1_0 && __self_2 == __arg1_2 &&
__self_1 == __arg1_1 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6,
(Statement::CreateServer(__self_0),
Statement::CreateServer(__arg1_0)) => __self_0 == __arg1_0,
(Statement::CreatePolicy {
name: __self_0,
table_name: __self_1,
policy_type: __self_2,
command: __self_3,
to: __self_4,
using: __self_5,
with_check: __self_6 }, Statement::CreatePolicy {
name: __arg1_0,
table_name: __arg1_1,
policy_type: __arg1_2,
command: __arg1_3,
to: __arg1_4,
using: __arg1_5,
with_check: __arg1_6 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6,
(Statement::CreateConnector(__self_0),
Statement::CreateConnector(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::AlterTable {
name: __self_0,
if_exists: __self_1,
only: __self_2,
operations: __self_3,
location: __self_4,
on_cluster: __self_5,
iceberg: __self_6,
end_token: __self_7 }, Statement::AlterTable {
name: __arg1_0,
if_exists: __arg1_1,
only: __arg1_2,
operations: __arg1_3,
location: __arg1_4,
on_cluster: __arg1_5,
iceberg: __arg1_6,
end_token: __arg1_7 }) =>
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_6 == __arg1_6 && __self_0 == __arg1_0 &&
__self_3 == __arg1_3 && __self_4 == __arg1_4 &&
__self_5 == __arg1_5 && __self_7 == __arg1_7,
(Statement::AlterSchema(__self_0),
Statement::AlterSchema(__arg1_0)) => __self_0 == __arg1_0,
(Statement::AlterIndex { name: __self_0, operation: __self_1
}, Statement::AlterIndex {
name: __arg1_0, operation: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::AlterView {
name: __self_0,
columns: __self_1,
query: __self_2,
with_options: __self_3 }, Statement::AlterView {
name: __arg1_0,
columns: __arg1_1,
query: __arg1_2,
with_options: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Statement::AlterType(__self_0),
Statement::AlterType(__arg1_0)) => __self_0 == __arg1_0,
(Statement::AlterRole { name: __self_0, operation: __self_1 },
Statement::AlterRole { name: __arg1_0, operation: __arg1_1
}) => __self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::AlterPolicy {
name: __self_0, table_name: __self_1, operation: __self_2 },
Statement::AlterPolicy {
name: __arg1_0, table_name: __arg1_1, operation: __arg1_2 })
=>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::AlterConnector {
name: __self_0,
properties: __self_1,
url: __self_2,
owner: __self_3 }, Statement::AlterConnector {
name: __arg1_0,
properties: __arg1_1,
url: __arg1_2,
owner: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Statement::AlterSession {
set: __self_0, session_params: __self_1 },
Statement::AlterSession {
set: __arg1_0, session_params: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::AttachDatabase {
schema_name: __self_0,
database_file_name: __self_1,
database: __self_2 }, Statement::AttachDatabase {
schema_name: __arg1_0,
database_file_name: __arg1_1,
database: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
(Statement::AttachDuckDBDatabase {
if_not_exists: __self_0,
database: __self_1,
database_path: __self_2,
database_alias: __self_3,
attach_options: __self_4 },
Statement::AttachDuckDBDatabase {
if_not_exists: __arg1_0,
database: __arg1_1,
database_path: __arg1_2,
database_alias: __arg1_3,
attach_options: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::DetachDuckDBDatabase {
if_exists: __self_0,
database: __self_1,
database_alias: __self_2 },
Statement::DetachDuckDBDatabase {
if_exists: __arg1_0,
database: __arg1_1,
database_alias: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::Drop {
object_type: __self_0,
if_exists: __self_1,
names: __self_2,
cascade: __self_3,
restrict: __self_4,
purge: __self_5,
temporary: __self_6,
table: __self_7 }, Statement::Drop {
object_type: __arg1_0,
if_exists: __arg1_1,
names: __arg1_2,
cascade: __arg1_3,
restrict: __arg1_4,
purge: __arg1_5,
temporary: __arg1_6,
table: __arg1_7 }) =>
__self_1 == __arg1_1 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_7 == __arg1_7,
(Statement::DropFunction {
if_exists: __self_0,
func_desc: __self_1,
drop_behavior: __self_2 }, Statement::DropFunction {
if_exists: __arg1_0,
func_desc: __arg1_1,
drop_behavior: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::DropDomain(__self_0),
Statement::DropDomain(__arg1_0)) => __self_0 == __arg1_0,
(Statement::DropProcedure {
if_exists: __self_0,
proc_desc: __self_1,
drop_behavior: __self_2 }, Statement::DropProcedure {
if_exists: __arg1_0,
proc_desc: __arg1_1,
drop_behavior: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::DropSecret {
if_exists: __self_0,
temporary: __self_1,
name: __self_2,
storage_specifier: __self_3 }, Statement::DropSecret {
if_exists: __arg1_0,
temporary: __arg1_1,
name: __arg1_2,
storage_specifier: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Statement::DropPolicy {
if_exists: __self_0,
name: __self_1,
table_name: __self_2,
drop_behavior: __self_3 }, Statement::DropPolicy {
if_exists: __arg1_0,
name: __arg1_1,
table_name: __arg1_2,
drop_behavior: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Statement::DropConnector {
if_exists: __self_0, name: __self_1 },
Statement::DropConnector {
if_exists: __arg1_0, name: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::Declare { stmts: __self_0 }, Statement::Declare {
stmts: __arg1_0 }) => __self_0 == __arg1_0,
(Statement::CreateExtension {
name: __self_0,
if_not_exists: __self_1,
cascade: __self_2,
schema: __self_3,
version: __self_4 }, Statement::CreateExtension {
name: __arg1_0,
if_not_exists: __arg1_1,
cascade: __arg1_2,
schema: __arg1_3,
version: __arg1_4 }) =>
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_0 == __arg1_0 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::DropExtension {
names: __self_0,
if_exists: __self_1,
cascade_or_restrict: __self_2 }, Statement::DropExtension {
names: __arg1_0,
if_exists: __arg1_1,
cascade_or_restrict: __arg1_2 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2,
(Statement::Fetch {
name: __self_0,
direction: __self_1,
position: __self_2,
into: __self_3 }, Statement::Fetch {
name: __arg1_0,
direction: __arg1_1,
position: __arg1_2,
into: __arg1_3 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3,
(Statement::Flush {
object_type: __self_0,
location: __self_1,
channel: __self_2,
read_lock: __self_3,
export: __self_4,
tables: __self_5 }, Statement::Flush {
object_type: __arg1_0,
location: __arg1_1,
channel: __arg1_2,
read_lock: __arg1_3,
export: __arg1_4,
tables: __arg1_5 }) =>
__self_3 == __arg1_3 && __self_4 == __arg1_4 &&
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_5 == __arg1_5,
(Statement::Discard { object_type: __self_0 },
Statement::Discard { object_type: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::ShowFunctions { filter: __self_0 },
Statement::ShowFunctions { filter: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::ShowVariable { variable: __self_0 },
Statement::ShowVariable { variable: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::ShowStatus {
filter: __self_0, global: __self_1, session: __self_2 },
Statement::ShowStatus {
filter: __arg1_0, global: __arg1_1, session: __arg1_2 }) =>
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_0 == __arg1_0,
(Statement::ShowVariables {
filter: __self_0, global: __self_1, session: __self_2 },
Statement::ShowVariables {
filter: __arg1_0, global: __arg1_1, session: __arg1_2 }) =>
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_0 == __arg1_0,
(Statement::ShowCreate {
obj_type: __self_0, obj_name: __self_1 },
Statement::ShowCreate {
obj_type: __arg1_0, obj_name: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::ShowColumns {
extended: __self_0, full: __self_1, show_options: __self_2
}, Statement::ShowColumns {
extended: __arg1_0, full: __arg1_1, show_options: __arg1_2
}) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::ShowDatabases {
terse: __self_0, history: __self_1, show_options: __self_2
}, Statement::ShowDatabases {
terse: __arg1_0, history: __arg1_1, show_options: __arg1_2
}) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::ShowSchemas {
terse: __self_0, history: __self_1, show_options: __self_2
}, Statement::ShowSchemas {
terse: __arg1_0, history: __arg1_1, show_options: __arg1_2
}) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::ShowCharset(__self_0),
Statement::ShowCharset(__arg1_0)) => __self_0 == __arg1_0,
(Statement::ShowObjects(__self_0),
Statement::ShowObjects(__arg1_0)) => __self_0 == __arg1_0,
(Statement::ShowTables {
terse: __self_0,
history: __self_1,
extended: __self_2,
full: __self_3,
external: __self_4,
show_options: __self_5 }, Statement::ShowTables {
terse: __arg1_0,
history: __arg1_1,
extended: __arg1_2,
full: __arg1_3,
external: __arg1_4,
show_options: __arg1_5 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::ShowViews {
terse: __self_0,
materialized: __self_1,
show_options: __self_2 }, Statement::ShowViews {
terse: __arg1_0,
materialized: __arg1_1,
show_options: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::ShowCollation { filter: __self_0 },
Statement::ShowCollation { filter: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::Use(__self_0), Statement::Use(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::StartTransaction {
modes: __self_0,
begin: __self_1,
transaction: __self_2,
modifier: __self_3,
statements: __self_4,
exception: __self_5,
has_end_keyword: __self_6 }, Statement::StartTransaction {
modes: __arg1_0,
begin: __arg1_1,
transaction: __arg1_2,
modifier: __arg1_3,
statements: __arg1_4,
exception: __arg1_5,
has_end_keyword: __arg1_6 }) =>
__self_1 == __arg1_1 && __self_6 == __arg1_6 &&
__self_0 == __arg1_0 && __self_2 == __arg1_2 &&
__self_3 == __arg1_3 && __self_4 == __arg1_4 &&
__self_5 == __arg1_5,
(Statement::Comment {
object_type: __self_0,
object_name: __self_1,
comment: __self_2,
if_exists: __self_3 }, Statement::Comment {
object_type: __arg1_0,
object_name: __arg1_1,
comment: __arg1_2,
if_exists: __arg1_3 }) =>
__self_3 == __arg1_3 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_2 == __arg1_2,
(Statement::Commit {
chain: __self_0, end: __self_1, modifier: __self_2 },
Statement::Commit {
chain: __arg1_0, end: __arg1_1, modifier: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::Rollback { chain: __self_0, savepoint: __self_1 },
Statement::Rollback { chain: __arg1_0, savepoint: __arg1_1
}) => __self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::CreateSchema {
schema_name: __self_0,
if_not_exists: __self_1,
with: __self_2,
options: __self_3,
default_collate_spec: __self_4,
clone: __self_5 }, Statement::CreateSchema {
schema_name: __arg1_0,
if_not_exists: __arg1_1,
with: __arg1_2,
options: __arg1_3,
default_collate_spec: __arg1_4,
clone: __arg1_5 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::CreateDatabase {
db_name: __self_0,
if_not_exists: __self_1,
location: __self_2,
managed_location: __self_3,
or_replace: __self_4,
transient: __self_5,
clone: __self_6,
data_retention_time_in_days: __self_7,
max_data_extension_time_in_days: __self_8,
external_volume: __self_9,
catalog: __self_10,
replace_invalid_characters: __self_11,
default_ddl_collation: __self_12,
storage_serialization_policy: __self_13,
comment: __self_14,
catalog_sync: __self_15,
catalog_sync_namespace_mode: __self_16,
catalog_sync_namespace_flatten_delimiter: __self_17,
with_tags: __self_18,
with_contacts: __self_19 }, Statement::CreateDatabase {
db_name: __arg1_0,
if_not_exists: __arg1_1,
location: __arg1_2,
managed_location: __arg1_3,
or_replace: __arg1_4,
transient: __arg1_5,
clone: __arg1_6,
data_retention_time_in_days: __arg1_7,
max_data_extension_time_in_days: __arg1_8,
external_volume: __arg1_9,
catalog: __arg1_10,
replace_invalid_characters: __arg1_11,
default_ddl_collation: __arg1_12,
storage_serialization_policy: __arg1_13,
comment: __arg1_14,
catalog_sync: __arg1_15,
catalog_sync_namespace_mode: __arg1_16,
catalog_sync_namespace_flatten_delimiter: __arg1_17,
with_tags: __arg1_18,
with_contacts: __arg1_19 }) =>
__self_1 == __arg1_1 && __self_4 == __arg1_4 &&
__self_5 == __arg1_5 && __self_0 == __arg1_0 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_6 == __arg1_6 && __self_7 == __arg1_7 &&
__self_8 == __arg1_8 && __self_9 == __arg1_9 &&
__self_10 == __arg1_10 && __self_11 == __arg1_11 &&
__self_12 == __arg1_12 && __self_13 == __arg1_13 &&
__self_14 == __arg1_14 && __self_15 == __arg1_15 &&
__self_16 == __arg1_16 && __self_17 == __arg1_17 &&
__self_18 == __arg1_18 && __self_19 == __arg1_19,
(Statement::CreateFunction(__self_0),
Statement::CreateFunction(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::CreateTrigger(__self_0),
Statement::CreateTrigger(__arg1_0)) => __self_0 == __arg1_0,
(Statement::DropTrigger(__self_0),
Statement::DropTrigger(__arg1_0)) => __self_0 == __arg1_0,
(Statement::CreateProcedure {
or_alter: __self_0,
name: __self_1,
params: __self_2,
language: __self_3,
body: __self_4 }, Statement::CreateProcedure {
or_alter: __arg1_0,
name: __arg1_1,
params: __arg1_2,
language: __arg1_3,
body: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::CreateMacro {
or_replace: __self_0,
temporary: __self_1,
name: __self_2,
args: __self_3,
definition: __self_4 }, Statement::CreateMacro {
or_replace: __arg1_0,
temporary: __arg1_1,
name: __arg1_2,
args: __arg1_3,
definition: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::CreateStage {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
stage_params: __self_4,
directory_table_params: __self_5,
file_format: __self_6,
copy_options: __self_7,
comment: __self_8 }, Statement::CreateStage {
or_replace: __arg1_0,
temporary: __arg1_1,
if_not_exists: __arg1_2,
name: __arg1_3,
stage_params: __arg1_4,
directory_table_params: __arg1_5,
file_format: __arg1_6,
copy_options: __arg1_7,
comment: __arg1_8 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6 && __self_7 == __arg1_7 &&
__self_8 == __arg1_8,
(Statement::Assert { condition: __self_0, message: __self_1 },
Statement::Assert { condition: __arg1_0, message: __arg1_1
}) => __self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::Grant {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
with_grant_option: __self_3,
as_grantor: __self_4,
granted_by: __self_5,
current_grants: __self_6 }, Statement::Grant {
privileges: __arg1_0,
objects: __arg1_1,
grantees: __arg1_2,
with_grant_option: __arg1_3,
as_grantor: __arg1_4,
granted_by: __arg1_5,
current_grants: __arg1_6 }) =>
__self_3 == __arg1_3 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6,
(Statement::Deny(__self_0), Statement::Deny(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Revoke {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
granted_by: __self_3,
cascade: __self_4 }, Statement::Revoke {
privileges: __arg1_0,
objects: __arg1_1,
grantees: __arg1_2,
granted_by: __arg1_3,
cascade: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::Deallocate { name: __self_0, prepare: __self_1 },
Statement::Deallocate { name: __arg1_0, prepare: __arg1_1 })
=> __self_1 == __arg1_1 && __self_0 == __arg1_0,
(Statement::Execute {
name: __self_0,
parameters: __self_1,
has_parentheses: __self_2,
immediate: __self_3,
into: __self_4,
using: __self_5,
output: __self_6,
default: __self_7 }, Statement::Execute {
name: __arg1_0,
parameters: __arg1_1,
has_parentheses: __arg1_2,
immediate: __arg1_3,
into: __arg1_4,
using: __arg1_5,
output: __arg1_6,
default: __arg1_7 }) =>
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_6 == __arg1_6 && __self_7 == __arg1_7 &&
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::Prepare {
name: __self_0, data_types: __self_1, statement: __self_2 },
Statement::Prepare {
name: __arg1_0, data_types: __arg1_1, statement: __arg1_2 })
=>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(Statement::Kill { modifier: __self_0, id: __self_1 },
Statement::Kill { modifier: __arg1_0, id: __arg1_1 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
(Statement::ExplainTable {
describe_alias: __self_0,
hive_format: __self_1,
has_table_keyword: __self_2,
table_name: __self_3 }, Statement::ExplainTable {
describe_alias: __arg1_0,
hive_format: __arg1_1,
has_table_keyword: __arg1_2,
table_name: __arg1_3 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_3 == __arg1_3,
(Statement::Explain {
describe_alias: __self_0,
analyze: __self_1,
verbose: __self_2,
query_plan: __self_3,
estimate: __self_4,
statement: __self_5,
format: __self_6,
options: __self_7 }, Statement::Explain {
describe_alias: __arg1_0,
analyze: __arg1_1,
verbose: __arg1_2,
query_plan: __arg1_3,
estimate: __arg1_4,
statement: __arg1_5,
format: __arg1_6,
options: __arg1_7 }) =>
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_3 == __arg1_3 && __self_4 == __arg1_4 &&
__self_0 == __arg1_0 && __self_5 == __arg1_5 &&
__self_6 == __arg1_6 && __self_7 == __arg1_7,
(Statement::Savepoint { name: __self_0 },
Statement::Savepoint { name: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::ReleaseSavepoint { name: __self_0 },
Statement::ReleaseSavepoint { name: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::Merge {
into: __self_0,
table: __self_1,
source: __self_2,
on: __self_3,
clauses: __self_4,
output: __self_5 }, Statement::Merge {
into: __arg1_0,
table: __arg1_1,
source: __arg1_2,
on: __arg1_3,
clauses: __arg1_4,
output: __arg1_5 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::Cache {
table_flag: __self_0,
table_name: __self_1,
has_as: __self_2,
options: __self_3,
query: __self_4 }, Statement::Cache {
table_flag: __arg1_0,
table_name: __arg1_1,
has_as: __arg1_2,
options: __arg1_3,
query: __arg1_4 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::UNCache {
table_name: __self_0, if_exists: __self_1 },
Statement::UNCache {
table_name: __arg1_0, if_exists: __arg1_1 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
(Statement::CreateSequence {
temporary: __self_0,
if_not_exists: __self_1,
name: __self_2,
data_type: __self_3,
sequence_options: __self_4,
owned_by: __self_5 }, Statement::CreateSequence {
temporary: __arg1_0,
if_not_exists: __arg1_1,
name: __arg1_2,
data_type: __arg1_3,
sequence_options: __arg1_4,
owned_by: __arg1_5 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::CreateDomain(__self_0),
Statement::CreateDomain(__arg1_0)) => __self_0 == __arg1_0,
(Statement::CreateType {
name: __self_0, representation: __self_1 },
Statement::CreateType {
name: __arg1_0, representation: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::Pragma {
name: __self_0, value: __self_1, is_eq: __self_2 },
Statement::Pragma {
name: __arg1_0, value: __arg1_1, is_eq: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
(Statement::LockTables { tables: __self_0 },
Statement::LockTables { tables: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::Unload {
query: __self_0,
query_text: __self_1,
to: __self_2,
auth: __self_3,
with: __self_4,
options: __self_5 }, Statement::Unload {
query: __arg1_0,
query_text: __arg1_1,
to: __arg1_2,
auth: __arg1_3,
with: __arg1_4,
options: __arg1_5 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::OptimizeTable {
name: __self_0,
on_cluster: __self_1,
partition: __self_2,
include_final: __self_3,
deduplicate: __self_4 }, Statement::OptimizeTable {
name: __arg1_0,
on_cluster: __arg1_1,
partition: __arg1_2,
include_final: __arg1_3,
deduplicate: __arg1_4 }) =>
__self_3 == __arg1_3 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1 && __self_2 == __arg1_2 &&
__self_4 == __arg1_4,
(Statement::LISTEN { channel: __self_0 }, Statement::LISTEN {
channel: __arg1_0 }) => __self_0 == __arg1_0,
(Statement::UNLISTEN { channel: __self_0 },
Statement::UNLISTEN { channel: __arg1_0 }) =>
__self_0 == __arg1_0,
(Statement::NOTIFY { channel: __self_0, payload: __self_1 },
Statement::NOTIFY { channel: __arg1_0, payload: __arg1_1 })
=> __self_0 == __arg1_0 && __self_1 == __arg1_1,
(Statement::LoadData {
local: __self_0,
inpath: __self_1,
overwrite: __self_2,
table_name: __self_3,
partitioned: __self_4,
table_format: __self_5 }, Statement::LoadData {
local: __arg1_0,
inpath: __arg1_1,
overwrite: __arg1_2,
table_name: __arg1_3,
partitioned: __arg1_4,
table_format: __arg1_5 }) =>
__self_0 == __arg1_0 && __self_2 == __arg1_2 &&
__self_1 == __arg1_1 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4 && __self_5 == __arg1_5,
(Statement::RenameTable(__self_0),
Statement::RenameTable(__arg1_0)) => __self_0 == __arg1_0,
(Statement::List(__self_0), Statement::List(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Remove(__self_0), Statement::Remove(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::RaisError {
message: __self_0,
severity: __self_1,
state: __self_2,
arguments: __self_3,
options: __self_4 }, Statement::RaisError {
message: __arg1_0,
severity: __arg1_1,
state: __arg1_2,
arguments: __arg1_3,
options: __arg1_4 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2 && __self_3 == __arg1_3 &&
__self_4 == __arg1_4,
(Statement::Print(__self_0), Statement::Print(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::Return(__self_0), Statement::Return(__arg1_0)) =>
__self_0 == __arg1_0,
(Statement::ExportData(__self_0),
Statement::ExportData(__arg1_0)) => __self_0 == __arg1_0,
(Statement::CreateUser(__self_0),
Statement::CreateUser(__arg1_0)) => __self_0 == __arg1_0,
(Statement::Vacuum(__self_0), Statement::Vacuum(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::PartialOrd for Statement {
#[inline]
fn partial_cmp(&self, other: &Statement)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(Statement::Analyze {
table_name: __self_0,
partitions: __self_1,
for_columns: __self_2,
columns: __self_3,
cache_metadata: __self_4,
noscan: __self_5,
compute_statistics: __self_6,
has_table_keyword: __self_7 }, Statement::Analyze {
table_name: __arg1_0,
partitions: __arg1_1,
for_columns: __arg1_2,
columns: __arg1_3,
cache_metadata: __arg1_4,
noscan: __arg1_5,
compute_statistics: __arg1_6,
has_table_keyword: __arg1_7 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Set(__self_0), Statement::Set(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Truncate {
table_names: __self_0,
partitions: __self_1,
table: __self_2,
identity: __self_3,
cascade: __self_4,
on_cluster: __self_5 }, Statement::Truncate {
table_names: __arg1_0,
partitions: __arg1_1,
table: __arg1_2,
identity: __arg1_3,
cascade: __arg1_4,
on_cluster: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Msck {
table_name: __self_0,
repair: __self_1,
partition_action: __self_2 }, Statement::Msck {
table_name: __arg1_0,
repair: __arg1_1,
partition_action: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Query(__self_0), Statement::Query(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Insert(__self_0), Statement::Insert(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Install { extension_name: __self_0 },
Statement::Install { extension_name: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Load { extension_name: __self_0 }, Statement::Load {
extension_name: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Directory {
overwrite: __self_0,
local: __self_1,
path: __self_2,
file_format: __self_3,
source: __self_4 }, Statement::Directory {
overwrite: __arg1_0,
local: __arg1_1,
path: __arg1_2,
file_format: __arg1_3,
source: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Case(__self_0), Statement::Case(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::If(__self_0), Statement::If(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::While(__self_0), Statement::While(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Raise(__self_0), Statement::Raise(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Call(__self_0), Statement::Call(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Copy {
source: __self_0,
to: __self_1,
target: __self_2,
options: __self_3,
legacy_options: __self_4,
values: __self_5 }, Statement::Copy {
source: __arg1_0,
to: __arg1_1,
target: __arg1_2,
options: __arg1_3,
legacy_options: __arg1_4,
values: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CopyIntoSnowflake {
kind: __self_0,
into: __self_1,
into_columns: __self_2,
from_obj: __self_3,
from_obj_alias: __self_4,
stage_params: __self_5,
from_transformations: __self_6,
from_query: __self_7,
files: __self_8,
pattern: __self_9,
file_format: __self_10,
copy_options: __self_11,
validation_mode: __self_12,
partition: __self_13 }, Statement::CopyIntoSnowflake {
kind: __arg1_0,
into: __arg1_1,
into_columns: __arg1_2,
from_obj: __arg1_3,
from_obj_alias: __arg1_4,
stage_params: __arg1_5,
from_transformations: __arg1_6,
from_query: __arg1_7,
files: __arg1_8,
pattern: __arg1_9,
file_format: __arg1_10,
copy_options: __arg1_11,
validation_mode: __arg1_12,
partition: __arg1_13 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_7,
__arg1_7) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_8,
__arg1_8) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_9,
__arg1_9) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_10,
__arg1_10) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_11,
__arg1_11) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_12,
__arg1_12) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(__self_13, __arg1_13),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Open(__self_0), Statement::Open(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Close { cursor: __self_0 }, Statement::Close {
cursor: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Update {
table: __self_0,
assignments: __self_1,
from: __self_2,
selection: __self_3,
returning: __self_4,
or: __self_5,
limit: __self_6 }, Statement::Update {
table: __arg1_0,
assignments: __arg1_1,
from: __arg1_2,
selection: __arg1_3,
returning: __arg1_4,
or: __arg1_5,
limit: __arg1_6 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Delete(__self_0), Statement::Delete(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateView {
or_alter: __self_0,
or_replace: __self_1,
materialized: __self_2,
secure: __self_3,
name: __self_4,
name_before_not_exists: __self_5,
columns: __self_6,
query: __self_7,
options: __self_8,
cluster_by: __self_9,
comment: __self_10,
with_no_schema_binding: __self_11,
if_not_exists: __self_12,
temporary: __self_13,
to: __self_14,
params: __self_15 }, Statement::CreateView {
or_alter: __arg1_0,
or_replace: __arg1_1,
materialized: __arg1_2,
secure: __arg1_3,
name: __arg1_4,
name_before_not_exists: __arg1_5,
columns: __arg1_6,
query: __arg1_7,
options: __arg1_8,
cluster_by: __arg1_9,
comment: __arg1_10,
with_no_schema_binding: __arg1_11,
if_not_exists: __arg1_12,
temporary: __arg1_13,
to: __arg1_14,
params: __arg1_15 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_7,
__arg1_7) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_8,
__arg1_8) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_9,
__arg1_9) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_10,
__arg1_10) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_11,
__arg1_11) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_12,
__arg1_12) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_13,
__arg1_13) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_14,
__arg1_14) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(__self_15, __arg1_15),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateTable(__self_0),
Statement::CreateTable(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateVirtualTable {
name: __self_0,
if_not_exists: __self_1,
module_name: __self_2,
module_args: __self_3 }, Statement::CreateVirtualTable {
name: __arg1_0,
if_not_exists: __arg1_1,
module_name: __arg1_2,
module_args: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateIndex(__self_0),
Statement::CreateIndex(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateRole {
names: __self_0,
if_not_exists: __self_1,
login: __self_2,
inherit: __self_3,
bypassrls: __self_4,
password: __self_5,
superuser: __self_6,
create_db: __self_7,
create_role: __self_8,
replication: __self_9,
connection_limit: __self_10,
valid_until: __self_11,
in_role: __self_12,
in_group: __self_13,
role: __self_14,
user: __self_15,
admin: __self_16,
authorization_owner: __self_17 }, Statement::CreateRole {
names: __arg1_0,
if_not_exists: __arg1_1,
login: __arg1_2,
inherit: __arg1_3,
bypassrls: __arg1_4,
password: __arg1_5,
superuser: __arg1_6,
create_db: __arg1_7,
create_role: __arg1_8,
replication: __arg1_9,
connection_limit: __arg1_10,
valid_until: __arg1_11,
in_role: __arg1_12,
in_group: __arg1_13,
role: __arg1_14,
user: __arg1_15,
admin: __arg1_16,
authorization_owner: __arg1_17 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_7,
__arg1_7) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_8,
__arg1_8) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_9,
__arg1_9) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_10,
__arg1_10) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_11,
__arg1_11) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_12,
__arg1_12) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_13,
__arg1_13) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_14,
__arg1_14) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_15,
__arg1_15) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_16,
__arg1_16) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(__self_17, __arg1_17),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateSecret {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
storage_specifier: __self_4,
secret_type: __self_5,
options: __self_6 }, Statement::CreateSecret {
or_replace: __arg1_0,
temporary: __arg1_1,
if_not_exists: __arg1_2,
name: __arg1_3,
storage_specifier: __arg1_4,
secret_type: __arg1_5,
options: __arg1_6 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateServer(__self_0),
Statement::CreateServer(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreatePolicy {
name: __self_0,
table_name: __self_1,
policy_type: __self_2,
command: __self_3,
to: __self_4,
using: __self_5,
with_check: __self_6 }, Statement::CreatePolicy {
name: __arg1_0,
table_name: __arg1_1,
policy_type: __arg1_2,
command: __arg1_3,
to: __arg1_4,
using: __arg1_5,
with_check: __arg1_6 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateConnector(__self_0),
Statement::CreateConnector(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::AlterTable {
name: __self_0,
if_exists: __self_1,
only: __self_2,
operations: __self_3,
location: __self_4,
on_cluster: __self_5,
iceberg: __self_6,
end_token: __self_7 }, Statement::AlterTable {
name: __arg1_0,
if_exists: __arg1_1,
only: __arg1_2,
operations: __arg1_3,
location: __arg1_4,
on_cluster: __arg1_5,
iceberg: __arg1_6,
end_token: __arg1_7 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterSchema(__self_0),
Statement::AlterSchema(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::AlterIndex { name: __self_0, operation: __self_1 },
Statement::AlterIndex { name: __arg1_0, operation: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::AlterView {
name: __self_0,
columns: __self_1,
query: __self_2,
with_options: __self_3 }, Statement::AlterView {
name: __arg1_0,
columns: __arg1_1,
query: __arg1_2,
with_options: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterType(__self_0), Statement::AlterType(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::AlterRole { name: __self_0, operation: __self_1 },
Statement::AlterRole { name: __arg1_0, operation: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::AlterPolicy {
name: __self_0, table_name: __self_1, operation: __self_2 },
Statement::AlterPolicy {
name: __arg1_0, table_name: __arg1_1, operation: __arg1_2 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterConnector {
name: __self_0,
properties: __self_1,
url: __self_2,
owner: __self_3 }, Statement::AlterConnector {
name: __arg1_0,
properties: __arg1_1,
url: __arg1_2,
owner: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterSession { set: __self_0, session_params: __self_1
}, Statement::AlterSession {
set: __arg1_0, session_params: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::AttachDatabase {
schema_name: __self_0,
database_file_name: __self_1,
database: __self_2 }, Statement::AttachDatabase {
schema_name: __arg1_0,
database_file_name: __arg1_1,
database: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::AttachDuckDBDatabase {
if_not_exists: __self_0,
database: __self_1,
database_path: __self_2,
database_alias: __self_3,
attach_options: __self_4 }, Statement::AttachDuckDBDatabase {
if_not_exists: __arg1_0,
database: __arg1_1,
database_path: __arg1_2,
database_alias: __arg1_3,
attach_options: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DetachDuckDBDatabase {
if_exists: __self_0,
database: __self_1,
database_alias: __self_2 }, Statement::DetachDuckDBDatabase {
if_exists: __arg1_0,
database: __arg1_1,
database_alias: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Drop {
object_type: __self_0,
if_exists: __self_1,
names: __self_2,
cascade: __self_3,
restrict: __self_4,
purge: __self_5,
temporary: __self_6,
table: __self_7 }, Statement::Drop {
object_type: __arg1_0,
if_exists: __arg1_1,
names: __arg1_2,
cascade: __arg1_3,
restrict: __arg1_4,
purge: __arg1_5,
temporary: __arg1_6,
table: __arg1_7 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropFunction {
if_exists: __self_0,
func_desc: __self_1,
drop_behavior: __self_2 }, Statement::DropFunction {
if_exists: __arg1_0,
func_desc: __arg1_1,
drop_behavior: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropDomain(__self_0), Statement::DropDomain(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::DropProcedure {
if_exists: __self_0,
proc_desc: __self_1,
drop_behavior: __self_2 }, Statement::DropProcedure {
if_exists: __arg1_0,
proc_desc: __arg1_1,
drop_behavior: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropSecret {
if_exists: __self_0,
temporary: __self_1,
name: __self_2,
storage_specifier: __self_3 }, Statement::DropSecret {
if_exists: __arg1_0,
temporary: __arg1_1,
name: __arg1_2,
storage_specifier: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropPolicy {
if_exists: __self_0,
name: __self_1,
table_name: __self_2,
drop_behavior: __self_3 }, Statement::DropPolicy {
if_exists: __arg1_0,
name: __arg1_1,
table_name: __arg1_2,
drop_behavior: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropConnector { if_exists: __self_0, name: __self_1 },
Statement::DropConnector { if_exists: __arg1_0, name: __arg1_1
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Declare { stmts: __self_0 }, Statement::Declare {
stmts: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateExtension {
name: __self_0,
if_not_exists: __self_1,
cascade: __self_2,
schema: __self_3,
version: __self_4 }, Statement::CreateExtension {
name: __arg1_0,
if_not_exists: __arg1_1,
cascade: __arg1_2,
schema: __arg1_3,
version: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropExtension {
names: __self_0,
if_exists: __self_1,
cascade_or_restrict: __self_2 }, Statement::DropExtension {
names: __arg1_0,
if_exists: __arg1_1,
cascade_or_restrict: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Fetch {
name: __self_0,
direction: __self_1,
position: __self_2,
into: __self_3 }, Statement::Fetch {
name: __arg1_0,
direction: __arg1_1,
position: __arg1_2,
into: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Flush {
object_type: __self_0,
location: __self_1,
channel: __self_2,
read_lock: __self_3,
export: __self_4,
tables: __self_5 }, Statement::Flush {
object_type: __arg1_0,
location: __arg1_1,
channel: __arg1_2,
read_lock: __arg1_3,
export: __arg1_4,
tables: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Discard { object_type: __self_0 },
Statement::Discard { object_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ShowFunctions { filter: __self_0 },
Statement::ShowFunctions { filter: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ShowVariable { variable: __self_0 },
Statement::ShowVariable { variable: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ShowStatus {
filter: __self_0, global: __self_1, session: __self_2 },
Statement::ShowStatus {
filter: __arg1_0, global: __arg1_1, session: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowVariables {
filter: __self_0, global: __self_1, session: __self_2 },
Statement::ShowVariables {
filter: __arg1_0, global: __arg1_1, session: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowCreate { obj_type: __self_0, obj_name: __self_1 },
Statement::ShowCreate { obj_type: __arg1_0, obj_name: __arg1_1
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::ShowColumns {
extended: __self_0, full: __self_1, show_options: __self_2 },
Statement::ShowColumns {
extended: __arg1_0, full: __arg1_1, show_options: __arg1_2 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowDatabases {
terse: __self_0, history: __self_1, show_options: __self_2 },
Statement::ShowDatabases {
terse: __arg1_0, history: __arg1_1, show_options: __arg1_2 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowSchemas {
terse: __self_0, history: __self_1, show_options: __self_2 },
Statement::ShowSchemas {
terse: __arg1_0, history: __arg1_1, show_options: __arg1_2 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowCharset(__self_0),
Statement::ShowCharset(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ShowObjects(__self_0),
Statement::ShowObjects(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ShowTables {
terse: __self_0,
history: __self_1,
extended: __self_2,
full: __self_3,
external: __self_4,
show_options: __self_5 }, Statement::ShowTables {
terse: __arg1_0,
history: __arg1_1,
extended: __arg1_2,
full: __arg1_3,
external: __arg1_4,
show_options: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowViews {
terse: __self_0,
materialized: __self_1,
show_options: __self_2 }, Statement::ShowViews {
terse: __arg1_0,
materialized: __arg1_1,
show_options: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowCollation { filter: __self_0 },
Statement::ShowCollation { filter: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Use(__self_0), Statement::Use(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::StartTransaction {
modes: __self_0,
begin: __self_1,
transaction: __self_2,
modifier: __self_3,
statements: __self_4,
exception: __self_5,
has_end_keyword: __self_6 }, Statement::StartTransaction {
modes: __arg1_0,
begin: __arg1_1,
transaction: __arg1_2,
modifier: __arg1_3,
statements: __arg1_4,
exception: __arg1_5,
has_end_keyword: __arg1_6 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Comment {
object_type: __self_0,
object_name: __self_1,
comment: __self_2,
if_exists: __self_3 }, Statement::Comment {
object_type: __arg1_0,
object_name: __arg1_1,
comment: __arg1_2,
if_exists: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Commit {
chain: __self_0, end: __self_1, modifier: __self_2 },
Statement::Commit {
chain: __arg1_0, end: __arg1_1, modifier: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Rollback { chain: __self_0, savepoint: __self_1 },
Statement::Rollback { chain: __arg1_0, savepoint: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::CreateSchema {
schema_name: __self_0,
if_not_exists: __self_1,
with: __self_2,
options: __self_3,
default_collate_spec: __self_4,
clone: __self_5 }, Statement::CreateSchema {
schema_name: __arg1_0,
if_not_exists: __arg1_1,
with: __arg1_2,
options: __arg1_3,
default_collate_spec: __arg1_4,
clone: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateDatabase {
db_name: __self_0,
if_not_exists: __self_1,
location: __self_2,
managed_location: __self_3,
or_replace: __self_4,
transient: __self_5,
clone: __self_6,
data_retention_time_in_days: __self_7,
max_data_extension_time_in_days: __self_8,
external_volume: __self_9,
catalog: __self_10,
replace_invalid_characters: __self_11,
default_ddl_collation: __self_12,
storage_serialization_policy: __self_13,
comment: __self_14,
catalog_sync: __self_15,
catalog_sync_namespace_mode: __self_16,
catalog_sync_namespace_flatten_delimiter: __self_17,
with_tags: __self_18,
with_contacts: __self_19 }, Statement::CreateDatabase {
db_name: __arg1_0,
if_not_exists: __arg1_1,
location: __arg1_2,
managed_location: __arg1_3,
or_replace: __arg1_4,
transient: __arg1_5,
clone: __arg1_6,
data_retention_time_in_days: __arg1_7,
max_data_extension_time_in_days: __arg1_8,
external_volume: __arg1_9,
catalog: __arg1_10,
replace_invalid_characters: __arg1_11,
default_ddl_collation: __arg1_12,
storage_serialization_policy: __arg1_13,
comment: __arg1_14,
catalog_sync: __arg1_15,
catalog_sync_namespace_mode: __arg1_16,
catalog_sync_namespace_flatten_delimiter: __arg1_17,
with_tags: __arg1_18,
with_contacts: __arg1_19 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_7,
__arg1_7) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_8,
__arg1_8) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_9,
__arg1_9) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_10,
__arg1_10) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_11,
__arg1_11) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_12,
__arg1_12) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_13,
__arg1_13) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_14,
__arg1_14) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_15,
__arg1_15) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_16,
__arg1_16) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_17,
__arg1_17) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_18,
__arg1_18) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(__self_19, __arg1_19),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateFunction(__self_0),
Statement::CreateFunction(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateTrigger(__self_0),
Statement::CreateTrigger(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::DropTrigger(__self_0),
Statement::DropTrigger(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateProcedure {
or_alter: __self_0,
name: __self_1,
params: __self_2,
language: __self_3,
body: __self_4 }, Statement::CreateProcedure {
or_alter: __arg1_0,
name: __arg1_1,
params: __arg1_2,
language: __arg1_3,
body: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateMacro {
or_replace: __self_0,
temporary: __self_1,
name: __self_2,
args: __self_3,
definition: __self_4 }, Statement::CreateMacro {
or_replace: __arg1_0,
temporary: __arg1_1,
name: __arg1_2,
args: __arg1_3,
definition: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateStage {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
stage_params: __self_4,
directory_table_params: __self_5,
file_format: __self_6,
copy_options: __self_7,
comment: __self_8 }, Statement::CreateStage {
or_replace: __arg1_0,
temporary: __arg1_1,
if_not_exists: __arg1_2,
name: __arg1_3,
stage_params: __arg1_4,
directory_table_params: __arg1_5,
file_format: __arg1_6,
copy_options: __arg1_7,
comment: __arg1_8 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_7,
__arg1_7) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_8, __arg1_8),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Assert { condition: __self_0, message: __self_1 },
Statement::Assert { condition: __arg1_0, message: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Grant {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
with_grant_option: __self_3,
as_grantor: __self_4,
granted_by: __self_5,
current_grants: __self_6 }, Statement::Grant {
privileges: __arg1_0,
objects: __arg1_1,
grantees: __arg1_2,
with_grant_option: __arg1_3,
as_grantor: __arg1_4,
granted_by: __arg1_5,
current_grants: __arg1_6 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Deny(__self_0), Statement::Deny(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Revoke {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
granted_by: __self_3,
cascade: __self_4 }, Statement::Revoke {
privileges: __arg1_0,
objects: __arg1_1,
grantees: __arg1_2,
granted_by: __arg1_3,
cascade: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Deallocate { name: __self_0, prepare: __self_1 },
Statement::Deallocate { name: __arg1_0, prepare: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Execute {
name: __self_0,
parameters: __self_1,
has_parentheses: __self_2,
immediate: __self_3,
into: __self_4,
using: __self_5,
output: __self_6,
default: __self_7 }, Statement::Execute {
name: __arg1_0,
parameters: __arg1_1,
has_parentheses: __arg1_2,
immediate: __arg1_3,
into: __arg1_4,
using: __arg1_5,
output: __arg1_6,
default: __arg1_7 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Prepare {
name: __self_0, data_types: __self_1, statement: __self_2 },
Statement::Prepare {
name: __arg1_0, data_types: __arg1_1, statement: __arg1_2 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Kill { modifier: __self_0, id: __self_1 },
Statement::Kill { modifier: __arg1_0, id: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::ExplainTable {
describe_alias: __self_0,
hive_format: __self_1,
has_table_keyword: __self_2,
table_name: __self_3 }, Statement::ExplainTable {
describe_alias: __arg1_0,
hive_format: __arg1_1,
has_table_keyword: __arg1_2,
table_name: __arg1_3 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Explain {
describe_alias: __self_0,
analyze: __self_1,
verbose: __self_2,
query_plan: __self_3,
estimate: __self_4,
statement: __self_5,
format: __self_6,
options: __self_7 }, Statement::Explain {
describe_alias: __arg1_0,
analyze: __arg1_1,
verbose: __arg1_2,
query_plan: __arg1_3,
estimate: __arg1_4,
statement: __arg1_5,
format: __arg1_6,
options: __arg1_7 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_5,
__arg1_5) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_6,
__arg1_6) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Savepoint { name: __self_0 }, Statement::Savepoint {
name: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ReleaseSavepoint { name: __self_0 },
Statement::ReleaseSavepoint { name: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Merge {
into: __self_0,
table: __self_1,
source: __self_2,
on: __self_3,
clauses: __self_4,
output: __self_5 }, Statement::Merge {
into: __arg1_0,
table: __arg1_1,
source: __arg1_2,
on: __arg1_3,
clauses: __arg1_4,
output: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Cache {
table_flag: __self_0,
table_name: __self_1,
has_as: __self_2,
options: __self_3,
query: __self_4 }, Statement::Cache {
table_flag: __arg1_0,
table_name: __arg1_1,
has_as: __arg1_2,
options: __arg1_3,
query: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::UNCache { table_name: __self_0, if_exists: __self_1 },
Statement::UNCache { table_name: __arg1_0, if_exists: __arg1_1
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::CreateSequence {
temporary: __self_0,
if_not_exists: __self_1,
name: __self_2,
data_type: __self_3,
sequence_options: __self_4,
owned_by: __self_5 }, Statement::CreateSequence {
temporary: __arg1_0,
if_not_exists: __arg1_1,
name: __arg1_2,
data_type: __arg1_3,
sequence_options: __arg1_4,
owned_by: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateDomain(__self_0),
Statement::CreateDomain(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateType { name: __self_0, representation: __self_1
}, Statement::CreateType {
name: __arg1_0, representation: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Pragma {
name: __self_0, value: __self_1, is_eq: __self_2 },
Statement::Pragma {
name: __arg1_0, value: __arg1_1, is_eq: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::LockTables { tables: __self_0 },
Statement::LockTables { tables: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Unload {
query: __self_0,
query_text: __self_1,
to: __self_2,
auth: __self_3,
with: __self_4,
options: __self_5 }, Statement::Unload {
query: __arg1_0,
query_text: __arg1_1,
to: __arg1_2,
auth: __arg1_3,
with: __arg1_4,
options: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::OptimizeTable {
name: __self_0,
on_cluster: __self_1,
partition: __self_2,
include_final: __self_3,
deduplicate: __self_4 }, Statement::OptimizeTable {
name: __arg1_0,
on_cluster: __arg1_1,
partition: __arg1_2,
include_final: __arg1_3,
deduplicate: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::LISTEN { channel: __self_0 }, Statement::LISTEN {
channel: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::UNLISTEN { channel: __self_0 }, Statement::UNLISTEN {
channel: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::NOTIFY { channel: __self_0, payload: __self_1 },
Statement::NOTIFY { channel: __arg1_0, payload: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::LoadData {
local: __self_0,
inpath: __self_1,
overwrite: __self_2,
table_name: __self_3,
partitioned: __self_4,
table_format: __self_5 }, Statement::LoadData {
local: __arg1_0,
inpath: __arg1_1,
overwrite: __arg1_2,
table_name: __arg1_3,
partitioned: __arg1_4,
table_format: __arg1_5 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_4,
__arg1_4) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::RenameTable(__self_0),
Statement::RenameTable(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::List(__self_0), Statement::List(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Remove(__self_0), Statement::Remove(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::RaisError {
message: __self_0,
severity: __self_1,
state: __self_2,
arguments: __self_3,
options: __self_4 }, Statement::RaisError {
message: __arg1_0,
severity: __arg1_1,
state: __arg1_2,
arguments: __arg1_3,
options: __arg1_4 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_2,
__arg1_2) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_3,
__arg1_3) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Print(__self_0), Statement::Print(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Return(__self_0), Statement::Return(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::ExportData(__self_0), Statement::ExportData(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::CreateUser(__self_0), Statement::CreateUser(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Statement::Vacuum(__self_0), Statement::Vacuum(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::Eq for Statement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Set>;
let _: ::core::cmp::AssertParamIsEq<Vec<TruncateTableTarget>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Option<TruncateIdentityOption>>;
let _: ::core::cmp::AssertParamIsEq<Option<CascadeOption>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<AddDropSync>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<Insert>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<Option<FileFormat>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<CaseStatement>;
let _: ::core::cmp::AssertParamIsEq<IfStatement>;
let _: ::core::cmp::AssertParamIsEq<WhileStatement>;
let _: ::core::cmp::AssertParamIsEq<RaiseStatement>;
let _: ::core::cmp::AssertParamIsEq<Function>;
let _: ::core::cmp::AssertParamIsEq<CopySource>;
let _: ::core::cmp::AssertParamIsEq<CopyTarget>;
let _: ::core::cmp::AssertParamIsEq<Vec<CopyOption>>;
let _: ::core::cmp::AssertParamIsEq<Vec<CopyLegacyOption>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Option<String>>>;
let _: ::core::cmp::AssertParamIsEq<CopyIntoSnowflakeKind>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<StageParamsObject>;
let _:
::core::cmp::AssertParamIsEq<Option<Vec<StageLoadSelectItemKind>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Query>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<String>>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<KeyValueOptions>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<OpenStatement>;
let _: ::core::cmp::AssertParamIsEq<CloseCursor>;
let _: ::core::cmp::AssertParamIsEq<TableWithJoins>;
let _: ::core::cmp::AssertParamIsEq<Vec<Assignment>>;
let _: ::core::cmp::AssertParamIsEq<Option<UpdateTableFromKind>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<SelectItem>>>;
let _: ::core::cmp::AssertParamIsEq<Option<SqliteOnConflict>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Delete>;
let _: ::core::cmp::AssertParamIsEq<Vec<ViewColumnDef>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<CreateTableOptions>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<CreateViewParams>>;
let _: ::core::cmp::AssertParamIsEq<CreateTable>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<CreateIndex>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<Password>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SecretOption>>;
let _: ::core::cmp::AssertParamIsEq<CreateServerStatement>;
let _: ::core::cmp::AssertParamIsEq<Option<CreatePolicyType>>;
let _: ::core::cmp::AssertParamIsEq<Option<CreatePolicyCommand>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Owner>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<CreateConnector>;
let _: ::core::cmp::AssertParamIsEq<Vec<AlterTableOperation>>;
let _: ::core::cmp::AssertParamIsEq<Option<HiveSetLocation>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<AttachedToken>;
let _: ::core::cmp::AssertParamIsEq<AlterSchema>;
let _: ::core::cmp::AssertParamIsEq<AlterIndexOperation>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<AlterType>;
let _: ::core::cmp::AssertParamIsEq<AlterRoleOperation>;
let _: ::core::cmp::AssertParamIsEq<AlterPolicyOperation>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<ddl::AlterConnectorOwner>>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<AttachDuckDBDatabaseOption>>;
let _: ::core::cmp::AssertParamIsEq<ObjectType>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<FunctionDesc>>;
let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
let _: ::core::cmp::AssertParamIsEq<DropDomain>;
let _: ::core::cmp::AssertParamIsEq<Vec<FunctionDesc>>;
let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Declare>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<ReferentialAction>>;
let _: ::core::cmp::AssertParamIsEq<FetchDirection>;
let _: ::core::cmp::AssertParamIsEq<FetchPosition>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<FlushType>;
let _: ::core::cmp::AssertParamIsEq<Option<FlushLocation>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<DiscardObject>;
let _: ::core::cmp::AssertParamIsEq<Option<ShowStatementFilter>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<ShowStatementFilter>>;
let _: ::core::cmp::AssertParamIsEq<Option<ShowStatementFilter>>;
let _: ::core::cmp::AssertParamIsEq<ShowCreateObject>;
let _: ::core::cmp::AssertParamIsEq<ShowStatementOptions>;
let _: ::core::cmp::AssertParamIsEq<ShowCharset>;
let _: ::core::cmp::AssertParamIsEq<ShowObjects>;
let _: ::core::cmp::AssertParamIsEq<Option<ShowStatementFilter>>;
let _: ::core::cmp::AssertParamIsEq<Use>;
let _: ::core::cmp::AssertParamIsEq<Vec<TransactionMode>>;
let _: ::core::cmp::AssertParamIsEq<Option<BeginTransactionKind>>;
let _: ::core::cmp::AssertParamIsEq<Option<TransactionModifier>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Statement>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<ExceptionWhen>>>;
let _: ::core::cmp::AssertParamIsEq<CommentObject>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<TransactionModifier>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<SchemaName>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<u64>>;
let _: ::core::cmp::AssertParamIsEq<Option<u64>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _:
::core::cmp::AssertParamIsEq<Option<StorageSerializationPolicy>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<CatalogSyncNamespaceMode>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Tag>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<ContactEntry>>>;
let _: ::core::cmp::AssertParamIsEq<CreateFunction>;
let _: ::core::cmp::AssertParamIsEq<CreateTrigger>;
let _: ::core::cmp::AssertParamIsEq<DropTrigger>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<ProcedureParam>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<ConditionalStatements>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<MacroArg>>>;
let _: ::core::cmp::AssertParamIsEq<MacroDefinition>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Privileges>;
let _: ::core::cmp::AssertParamIsEq<Option<GrantObjects>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Grantee>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<CurrentGrantsKind>>;
let _: ::core::cmp::AssertParamIsEq<DenyStatement>;
let _: ::core::cmp::AssertParamIsEq<Option<GrantObjects>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Grantee>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<CascadeOption>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ExprWithAlias>>;
let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
let _: ::core::cmp::AssertParamIsEq<Box<Statement>>;
let _: ::core::cmp::AssertParamIsEq<Option<KillType>>;
let _: ::core::cmp::AssertParamIsEq<u64>;
let _: ::core::cmp::AssertParamIsEq<DescribeAlias>;
let _: ::core::cmp::AssertParamIsEq<Option<HiveDescribeFormat>>;
let _: ::core::cmp::AssertParamIsEq<Box<Statement>>;
let _: ::core::cmp::AssertParamIsEq<Option<AnalyzeFormatKind>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<UtilityOption>>>;
let _: ::core::cmp::AssertParamIsEq<TableFactor>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<MergeClause>>;
let _: ::core::cmp::AssertParamIsEq<Option<OutputClause>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Query>>>;
let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SequenceOptions>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<CreateDomain>;
let _: ::core::cmp::AssertParamIsEq<UserDefinedTypeRepresentation>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _: ::core::cmp::AssertParamIsEq<Vec<LockTable>>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Query>>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<IamRoleKind>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<Vec<CopyLegacyOption>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<Partition>>;
let _: ::core::cmp::AssertParamIsEq<Option<Deduplicate>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Option<HiveLoadDataFormat>>;
let _: ::core::cmp::AssertParamIsEq<Vec<RenameTable>>;
let _: ::core::cmp::AssertParamIsEq<FileStagingCommand>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<RaisErrorOption>>;
let _: ::core::cmp::AssertParamIsEq<PrintStatement>;
let _: ::core::cmp::AssertParamIsEq<ReturnStatement>;
let _: ::core::cmp::AssertParamIsEq<ExportData>;
let _: ::core::cmp::AssertParamIsEq<CreateUser>;
let _: ::core::cmp::AssertParamIsEq<VacuumStatement>;
}
}Eq, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::Ord for Statement {
#[inline]
fn cmp(&self, other: &Statement) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Statement::Analyze {
table_name: __self_0,
partitions: __self_1,
for_columns: __self_2,
columns: __self_3,
cache_metadata: __self_4,
noscan: __self_5,
compute_statistics: __self_6,
has_table_keyword: __self_7 }, Statement::Analyze {
table_name: __arg1_0,
partitions: __arg1_1,
for_columns: __arg1_2,
columns: __arg1_3,
cache_metadata: __arg1_4,
noscan: __arg1_5,
compute_statistics: __arg1_6,
has_table_keyword: __arg1_7 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Set(__self_0), Statement::Set(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Truncate {
table_names: __self_0,
partitions: __self_1,
table: __self_2,
identity: __self_3,
cascade: __self_4,
on_cluster: __self_5 }, Statement::Truncate {
table_names: __arg1_0,
partitions: __arg1_1,
table: __arg1_2,
identity: __arg1_3,
cascade: __arg1_4,
on_cluster: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Msck {
table_name: __self_0,
repair: __self_1,
partition_action: __self_2 }, Statement::Msck {
table_name: __arg1_0,
repair: __arg1_1,
partition_action: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Query(__self_0), Statement::Query(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Insert(__self_0), Statement::Insert(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Install { extension_name: __self_0 },
Statement::Install { extension_name: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Load { extension_name: __self_0 },
Statement::Load { extension_name: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Directory {
overwrite: __self_0,
local: __self_1,
path: __self_2,
file_format: __self_3,
source: __self_4 }, Statement::Directory {
overwrite: __arg1_0,
local: __arg1_1,
path: __arg1_2,
file_format: __arg1_3,
source: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Case(__self_0), Statement::Case(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::If(__self_0), Statement::If(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::While(__self_0), Statement::While(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Raise(__self_0), Statement::Raise(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Call(__self_0), Statement::Call(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Copy {
source: __self_0,
to: __self_1,
target: __self_2,
options: __self_3,
legacy_options: __self_4,
values: __self_5 }, Statement::Copy {
source: __arg1_0,
to: __arg1_1,
target: __arg1_2,
options: __arg1_3,
legacy_options: __arg1_4,
values: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CopyIntoSnowflake {
kind: __self_0,
into: __self_1,
into_columns: __self_2,
from_obj: __self_3,
from_obj_alias: __self_4,
stage_params: __self_5,
from_transformations: __self_6,
from_query: __self_7,
files: __self_8,
pattern: __self_9,
file_format: __self_10,
copy_options: __self_11,
validation_mode: __self_12,
partition: __self_13 }, Statement::CopyIntoSnowflake {
kind: __arg1_0,
into: __arg1_1,
into_columns: __arg1_2,
from_obj: __arg1_3,
from_obj_alias: __arg1_4,
stage_params: __arg1_5,
from_transformations: __arg1_6,
from_query: __arg1_7,
files: __arg1_8,
pattern: __arg1_9,
file_format: __arg1_10,
copy_options: __arg1_11,
validation_mode: __arg1_12,
partition: __arg1_13 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_7, __arg1_7) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_8, __arg1_8) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_9, __arg1_9) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_10, __arg1_10) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_11, __arg1_11) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_12, __arg1_12) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_13, __arg1_13),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Open(__self_0), Statement::Open(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Close { cursor: __self_0 }, Statement::Close {
cursor: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Update {
table: __self_0,
assignments: __self_1,
from: __self_2,
selection: __self_3,
returning: __self_4,
or: __self_5,
limit: __self_6 }, Statement::Update {
table: __arg1_0,
assignments: __arg1_1,
from: __arg1_2,
selection: __arg1_3,
returning: __arg1_4,
or: __arg1_5,
limit: __arg1_6 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Delete(__self_0), Statement::Delete(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateView {
or_alter: __self_0,
or_replace: __self_1,
materialized: __self_2,
secure: __self_3,
name: __self_4,
name_before_not_exists: __self_5,
columns: __self_6,
query: __self_7,
options: __self_8,
cluster_by: __self_9,
comment: __self_10,
with_no_schema_binding: __self_11,
if_not_exists: __self_12,
temporary: __self_13,
to: __self_14,
params: __self_15 }, Statement::CreateView {
or_alter: __arg1_0,
or_replace: __arg1_1,
materialized: __arg1_2,
secure: __arg1_3,
name: __arg1_4,
name_before_not_exists: __arg1_5,
columns: __arg1_6,
query: __arg1_7,
options: __arg1_8,
cluster_by: __arg1_9,
comment: __arg1_10,
with_no_schema_binding: __arg1_11,
if_not_exists: __arg1_12,
temporary: __arg1_13,
to: __arg1_14,
params: __arg1_15 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_7, __arg1_7) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_8, __arg1_8) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_9, __arg1_9) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_10, __arg1_10) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_11, __arg1_11) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_12, __arg1_12) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_13, __arg1_13) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_14, __arg1_14) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_15, __arg1_15),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateTable(__self_0),
Statement::CreateTable(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateVirtualTable {
name: __self_0,
if_not_exists: __self_1,
module_name: __self_2,
module_args: __self_3 }, Statement::CreateVirtualTable {
name: __arg1_0,
if_not_exists: __arg1_1,
module_name: __arg1_2,
module_args: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateIndex(__self_0),
Statement::CreateIndex(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateRole {
names: __self_0,
if_not_exists: __self_1,
login: __self_2,
inherit: __self_3,
bypassrls: __self_4,
password: __self_5,
superuser: __self_6,
create_db: __self_7,
create_role: __self_8,
replication: __self_9,
connection_limit: __self_10,
valid_until: __self_11,
in_role: __self_12,
in_group: __self_13,
role: __self_14,
user: __self_15,
admin: __self_16,
authorization_owner: __self_17 }, Statement::CreateRole {
names: __arg1_0,
if_not_exists: __arg1_1,
login: __arg1_2,
inherit: __arg1_3,
bypassrls: __arg1_4,
password: __arg1_5,
superuser: __arg1_6,
create_db: __arg1_7,
create_role: __arg1_8,
replication: __arg1_9,
connection_limit: __arg1_10,
valid_until: __arg1_11,
in_role: __arg1_12,
in_group: __arg1_13,
role: __arg1_14,
user: __arg1_15,
admin: __arg1_16,
authorization_owner: __arg1_17 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_7, __arg1_7) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_8, __arg1_8) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_9, __arg1_9) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_10, __arg1_10) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_11, __arg1_11) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_12, __arg1_12) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_13, __arg1_13) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_14, __arg1_14) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_15, __arg1_15) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_16, __arg1_16) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_17, __arg1_17),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateSecret {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
storage_specifier: __self_4,
secret_type: __self_5,
options: __self_6 }, Statement::CreateSecret {
or_replace: __arg1_0,
temporary: __arg1_1,
if_not_exists: __arg1_2,
name: __arg1_3,
storage_specifier: __arg1_4,
secret_type: __arg1_5,
options: __arg1_6 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateServer(__self_0),
Statement::CreateServer(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreatePolicy {
name: __self_0,
table_name: __self_1,
policy_type: __self_2,
command: __self_3,
to: __self_4,
using: __self_5,
with_check: __self_6 }, Statement::CreatePolicy {
name: __arg1_0,
table_name: __arg1_1,
policy_type: __arg1_2,
command: __arg1_3,
to: __arg1_4,
using: __arg1_5,
with_check: __arg1_6 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateConnector(__self_0),
Statement::CreateConnector(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::AlterTable {
name: __self_0,
if_exists: __self_1,
only: __self_2,
operations: __self_3,
location: __self_4,
on_cluster: __self_5,
iceberg: __self_6,
end_token: __self_7 }, Statement::AlterTable {
name: __arg1_0,
if_exists: __arg1_1,
only: __arg1_2,
operations: __arg1_3,
location: __arg1_4,
on_cluster: __arg1_5,
iceberg: __arg1_6,
end_token: __arg1_7 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterSchema(__self_0),
Statement::AlterSchema(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::AlterIndex { name: __self_0, operation: __self_1
}, Statement::AlterIndex {
name: __arg1_0, operation: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::AlterView {
name: __self_0,
columns: __self_1,
query: __self_2,
with_options: __self_3 }, Statement::AlterView {
name: __arg1_0,
columns: __arg1_1,
query: __arg1_2,
with_options: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterType(__self_0),
Statement::AlterType(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::AlterRole { name: __self_0, operation: __self_1
}, Statement::AlterRole {
name: __arg1_0, operation: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::AlterPolicy {
name: __self_0, table_name: __self_1, operation: __self_2 },
Statement::AlterPolicy {
name: __arg1_0, table_name: __arg1_1, operation: __arg1_2 })
=>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterConnector {
name: __self_0,
properties: __self_1,
url: __self_2,
owner: __self_3 }, Statement::AlterConnector {
name: __arg1_0,
properties: __arg1_1,
url: __arg1_2,
owner: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::AlterSession {
set: __self_0, session_params: __self_1 },
Statement::AlterSession {
set: __arg1_0, session_params: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::AttachDatabase {
schema_name: __self_0,
database_file_name: __self_1,
database: __self_2 }, Statement::AttachDatabase {
schema_name: __arg1_0,
database_file_name: __arg1_1,
database: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::AttachDuckDBDatabase {
if_not_exists: __self_0,
database: __self_1,
database_path: __self_2,
database_alias: __self_3,
attach_options: __self_4 },
Statement::AttachDuckDBDatabase {
if_not_exists: __arg1_0,
database: __arg1_1,
database_path: __arg1_2,
database_alias: __arg1_3,
attach_options: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DetachDuckDBDatabase {
if_exists: __self_0,
database: __self_1,
database_alias: __self_2 },
Statement::DetachDuckDBDatabase {
if_exists: __arg1_0,
database: __arg1_1,
database_alias: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Drop {
object_type: __self_0,
if_exists: __self_1,
names: __self_2,
cascade: __self_3,
restrict: __self_4,
purge: __self_5,
temporary: __self_6,
table: __self_7 }, Statement::Drop {
object_type: __arg1_0,
if_exists: __arg1_1,
names: __arg1_2,
cascade: __arg1_3,
restrict: __arg1_4,
purge: __arg1_5,
temporary: __arg1_6,
table: __arg1_7 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropFunction {
if_exists: __self_0,
func_desc: __self_1,
drop_behavior: __self_2 }, Statement::DropFunction {
if_exists: __arg1_0,
func_desc: __arg1_1,
drop_behavior: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropDomain(__self_0),
Statement::DropDomain(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::DropProcedure {
if_exists: __self_0,
proc_desc: __self_1,
drop_behavior: __self_2 }, Statement::DropProcedure {
if_exists: __arg1_0,
proc_desc: __arg1_1,
drop_behavior: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropSecret {
if_exists: __self_0,
temporary: __self_1,
name: __self_2,
storage_specifier: __self_3 }, Statement::DropSecret {
if_exists: __arg1_0,
temporary: __arg1_1,
name: __arg1_2,
storage_specifier: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropPolicy {
if_exists: __self_0,
name: __self_1,
table_name: __self_2,
drop_behavior: __self_3 }, Statement::DropPolicy {
if_exists: __arg1_0,
name: __arg1_1,
table_name: __arg1_2,
drop_behavior: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropConnector {
if_exists: __self_0, name: __self_1 },
Statement::DropConnector {
if_exists: __arg1_0, name: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Declare { stmts: __self_0 },
Statement::Declare { stmts: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateExtension {
name: __self_0,
if_not_exists: __self_1,
cascade: __self_2,
schema: __self_3,
version: __self_4 }, Statement::CreateExtension {
name: __arg1_0,
if_not_exists: __arg1_1,
cascade: __arg1_2,
schema: __arg1_3,
version: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::DropExtension {
names: __self_0,
if_exists: __self_1,
cascade_or_restrict: __self_2 }, Statement::DropExtension {
names: __arg1_0,
if_exists: __arg1_1,
cascade_or_restrict: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Fetch {
name: __self_0,
direction: __self_1,
position: __self_2,
into: __self_3 }, Statement::Fetch {
name: __arg1_0,
direction: __arg1_1,
position: __arg1_2,
into: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Flush {
object_type: __self_0,
location: __self_1,
channel: __self_2,
read_lock: __self_3,
export: __self_4,
tables: __self_5 }, Statement::Flush {
object_type: __arg1_0,
location: __arg1_1,
channel: __arg1_2,
read_lock: __arg1_3,
export: __arg1_4,
tables: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Discard { object_type: __self_0 },
Statement::Discard { object_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ShowFunctions { filter: __self_0 },
Statement::ShowFunctions { filter: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ShowVariable { variable: __self_0 },
Statement::ShowVariable { variable: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ShowStatus {
filter: __self_0, global: __self_1, session: __self_2 },
Statement::ShowStatus {
filter: __arg1_0, global: __arg1_1, session: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowVariables {
filter: __self_0, global: __self_1, session: __self_2 },
Statement::ShowVariables {
filter: __arg1_0, global: __arg1_1, session: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowCreate {
obj_type: __self_0, obj_name: __self_1 },
Statement::ShowCreate {
obj_type: __arg1_0, obj_name: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::ShowColumns {
extended: __self_0, full: __self_1, show_options: __self_2
}, Statement::ShowColumns {
extended: __arg1_0, full: __arg1_1, show_options: __arg1_2
}) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowDatabases {
terse: __self_0, history: __self_1, show_options: __self_2
}, Statement::ShowDatabases {
terse: __arg1_0, history: __arg1_1, show_options: __arg1_2
}) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowSchemas {
terse: __self_0, history: __self_1, show_options: __self_2
}, Statement::ShowSchemas {
terse: __arg1_0, history: __arg1_1, show_options: __arg1_2
}) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowCharset(__self_0),
Statement::ShowCharset(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ShowObjects(__self_0),
Statement::ShowObjects(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ShowTables {
terse: __self_0,
history: __self_1,
extended: __self_2,
full: __self_3,
external: __self_4,
show_options: __self_5 }, Statement::ShowTables {
terse: __arg1_0,
history: __arg1_1,
extended: __arg1_2,
full: __arg1_3,
external: __arg1_4,
show_options: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowViews {
terse: __self_0,
materialized: __self_1,
show_options: __self_2 }, Statement::ShowViews {
terse: __arg1_0,
materialized: __arg1_1,
show_options: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::ShowCollation { filter: __self_0 },
Statement::ShowCollation { filter: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Use(__self_0), Statement::Use(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::StartTransaction {
modes: __self_0,
begin: __self_1,
transaction: __self_2,
modifier: __self_3,
statements: __self_4,
exception: __self_5,
has_end_keyword: __self_6 }, Statement::StartTransaction {
modes: __arg1_0,
begin: __arg1_1,
transaction: __arg1_2,
modifier: __arg1_3,
statements: __arg1_4,
exception: __arg1_5,
has_end_keyword: __arg1_6 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Comment {
object_type: __self_0,
object_name: __self_1,
comment: __self_2,
if_exists: __self_3 }, Statement::Comment {
object_type: __arg1_0,
object_name: __arg1_1,
comment: __arg1_2,
if_exists: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Commit {
chain: __self_0, end: __self_1, modifier: __self_2 },
Statement::Commit {
chain: __arg1_0, end: __arg1_1, modifier: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Rollback { chain: __self_0, savepoint: __self_1
}, Statement::Rollback {
chain: __arg1_0, savepoint: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::CreateSchema {
schema_name: __self_0,
if_not_exists: __self_1,
with: __self_2,
options: __self_3,
default_collate_spec: __self_4,
clone: __self_5 }, Statement::CreateSchema {
schema_name: __arg1_0,
if_not_exists: __arg1_1,
with: __arg1_2,
options: __arg1_3,
default_collate_spec: __arg1_4,
clone: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateDatabase {
db_name: __self_0,
if_not_exists: __self_1,
location: __self_2,
managed_location: __self_3,
or_replace: __self_4,
transient: __self_5,
clone: __self_6,
data_retention_time_in_days: __self_7,
max_data_extension_time_in_days: __self_8,
external_volume: __self_9,
catalog: __self_10,
replace_invalid_characters: __self_11,
default_ddl_collation: __self_12,
storage_serialization_policy: __self_13,
comment: __self_14,
catalog_sync: __self_15,
catalog_sync_namespace_mode: __self_16,
catalog_sync_namespace_flatten_delimiter: __self_17,
with_tags: __self_18,
with_contacts: __self_19 }, Statement::CreateDatabase {
db_name: __arg1_0,
if_not_exists: __arg1_1,
location: __arg1_2,
managed_location: __arg1_3,
or_replace: __arg1_4,
transient: __arg1_5,
clone: __arg1_6,
data_retention_time_in_days: __arg1_7,
max_data_extension_time_in_days: __arg1_8,
external_volume: __arg1_9,
catalog: __arg1_10,
replace_invalid_characters: __arg1_11,
default_ddl_collation: __arg1_12,
storage_serialization_policy: __arg1_13,
comment: __arg1_14,
catalog_sync: __arg1_15,
catalog_sync_namespace_mode: __arg1_16,
catalog_sync_namespace_flatten_delimiter: __arg1_17,
with_tags: __arg1_18,
with_contacts: __arg1_19 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_7, __arg1_7) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_8, __arg1_8) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_9, __arg1_9) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_10, __arg1_10) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_11, __arg1_11) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_12, __arg1_12) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_13, __arg1_13) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_14, __arg1_14) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_15, __arg1_15) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_16, __arg1_16) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_17, __arg1_17) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_18, __arg1_18) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_19, __arg1_19),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateFunction(__self_0),
Statement::CreateFunction(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateTrigger(__self_0),
Statement::CreateTrigger(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::DropTrigger(__self_0),
Statement::DropTrigger(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateProcedure {
or_alter: __self_0,
name: __self_1,
params: __self_2,
language: __self_3,
body: __self_4 }, Statement::CreateProcedure {
or_alter: __arg1_0,
name: __arg1_1,
params: __arg1_2,
language: __arg1_3,
body: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateMacro {
or_replace: __self_0,
temporary: __self_1,
name: __self_2,
args: __self_3,
definition: __self_4 }, Statement::CreateMacro {
or_replace: __arg1_0,
temporary: __arg1_1,
name: __arg1_2,
args: __arg1_3,
definition: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateStage {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
stage_params: __self_4,
directory_table_params: __self_5,
file_format: __self_6,
copy_options: __self_7,
comment: __self_8 }, Statement::CreateStage {
or_replace: __arg1_0,
temporary: __arg1_1,
if_not_exists: __arg1_2,
name: __arg1_3,
stage_params: __arg1_4,
directory_table_params: __arg1_5,
file_format: __arg1_6,
copy_options: __arg1_7,
comment: __arg1_8 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_7, __arg1_7) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_8, __arg1_8),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Assert { condition: __self_0, message: __self_1
}, Statement::Assert {
condition: __arg1_0, message: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Grant {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
with_grant_option: __self_3,
as_grantor: __self_4,
granted_by: __self_5,
current_grants: __self_6 }, Statement::Grant {
privileges: __arg1_0,
objects: __arg1_1,
grantees: __arg1_2,
with_grant_option: __arg1_3,
as_grantor: __arg1_4,
granted_by: __arg1_5,
current_grants: __arg1_6 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_6, __arg1_6),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Deny(__self_0), Statement::Deny(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Revoke {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
granted_by: __self_3,
cascade: __self_4 }, Statement::Revoke {
privileges: __arg1_0,
objects: __arg1_1,
grantees: __arg1_2,
granted_by: __arg1_3,
cascade: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Deallocate { name: __self_0, prepare: __self_1
}, Statement::Deallocate { name: __arg1_0, prepare: __arg1_1
}) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Execute {
name: __self_0,
parameters: __self_1,
has_parentheses: __self_2,
immediate: __self_3,
into: __self_4,
using: __self_5,
output: __self_6,
default: __self_7 }, Statement::Execute {
name: __arg1_0,
parameters: __arg1_1,
has_parentheses: __arg1_2,
immediate: __arg1_3,
into: __arg1_4,
using: __arg1_5,
output: __arg1_6,
default: __arg1_7 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Prepare {
name: __self_0, data_types: __self_1, statement: __self_2 },
Statement::Prepare {
name: __arg1_0, data_types: __arg1_1, statement: __arg1_2 })
=>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::Kill { modifier: __self_0, id: __self_1 },
Statement::Kill { modifier: __arg1_0, id: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::ExplainTable {
describe_alias: __self_0,
hive_format: __self_1,
has_table_keyword: __self_2,
table_name: __self_3 }, Statement::ExplainTable {
describe_alias: __arg1_0,
hive_format: __arg1_1,
has_table_keyword: __arg1_2,
table_name: __arg1_3 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_3, __arg1_3),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Explain {
describe_alias: __self_0,
analyze: __self_1,
verbose: __self_2,
query_plan: __self_3,
estimate: __self_4,
statement: __self_5,
format: __self_6,
options: __self_7 }, Statement::Explain {
describe_alias: __arg1_0,
analyze: __arg1_1,
verbose: __arg1_2,
query_plan: __arg1_3,
estimate: __arg1_4,
statement: __arg1_5,
format: __arg1_6,
options: __arg1_7 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_5, __arg1_5) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_6, __arg1_6) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_7, __arg1_7),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Savepoint { name: __self_0 },
Statement::Savepoint { name: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ReleaseSavepoint { name: __self_0 },
Statement::ReleaseSavepoint { name: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Merge {
into: __self_0,
table: __self_1,
source: __self_2,
on: __self_3,
clauses: __self_4,
output: __self_5 }, Statement::Merge {
into: __arg1_0,
table: __arg1_1,
source: __arg1_2,
on: __arg1_3,
clauses: __arg1_4,
output: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Cache {
table_flag: __self_0,
table_name: __self_1,
has_as: __self_2,
options: __self_3,
query: __self_4 }, Statement::Cache {
table_flag: __arg1_0,
table_name: __arg1_1,
has_as: __arg1_2,
options: __arg1_3,
query: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::UNCache {
table_name: __self_0, if_exists: __self_1 },
Statement::UNCache {
table_name: __arg1_0, if_exists: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::CreateSequence {
temporary: __self_0,
if_not_exists: __self_1,
name: __self_2,
data_type: __self_3,
sequence_options: __self_4,
owned_by: __self_5 }, Statement::CreateSequence {
temporary: __arg1_0,
if_not_exists: __arg1_1,
name: __arg1_2,
data_type: __arg1_3,
sequence_options: __arg1_4,
owned_by: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::CreateDomain(__self_0),
Statement::CreateDomain(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateType {
name: __self_0, representation: __self_1 },
Statement::CreateType {
name: __arg1_0, representation: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::Pragma {
name: __self_0, value: __self_1, is_eq: __self_2 },
Statement::Pragma {
name: __arg1_0, value: __arg1_1, is_eq: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(Statement::LockTables { tables: __self_0 },
Statement::LockTables { tables: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Unload {
query: __self_0,
query_text: __self_1,
to: __self_2,
auth: __self_3,
with: __self_4,
options: __self_5 }, Statement::Unload {
query: __arg1_0,
query_text: __arg1_1,
to: __arg1_2,
auth: __arg1_3,
with: __arg1_4,
options: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::OptimizeTable {
name: __self_0,
on_cluster: __self_1,
partition: __self_2,
include_final: __self_3,
deduplicate: __self_4 }, Statement::OptimizeTable {
name: __arg1_0,
on_cluster: __arg1_1,
partition: __arg1_2,
include_final: __arg1_3,
deduplicate: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::LISTEN { channel: __self_0 },
Statement::LISTEN { channel: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::UNLISTEN { channel: __self_0 },
Statement::UNLISTEN { channel: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::NOTIFY { channel: __self_0, payload: __self_1 },
Statement::NOTIFY { channel: __arg1_0, payload: __arg1_1 })
=>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(Statement::LoadData {
local: __self_0,
inpath: __self_1,
overwrite: __self_2,
table_name: __self_3,
partitioned: __self_4,
table_format: __self_5 }, Statement::LoadData {
local: __arg1_0,
inpath: __arg1_1,
overwrite: __arg1_2,
table_name: __arg1_3,
partitioned: __arg1_4,
table_format: __arg1_5 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_4, __arg1_4) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_5, __arg1_5),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::RenameTable(__self_0),
Statement::RenameTable(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::List(__self_0), Statement::List(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Remove(__self_0), Statement::Remove(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::RaisError {
message: __self_0,
severity: __self_1,
state: __self_2,
arguments: __self_3,
options: __self_4 }, Statement::RaisError {
message: __arg1_0,
severity: __arg1_1,
state: __arg1_2,
arguments: __arg1_3,
options: __arg1_4 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_4, __arg1_4),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
(Statement::Print(__self_0), Statement::Print(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Return(__self_0), Statement::Return(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::ExportData(__self_0),
Statement::ExportData(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::CreateUser(__self_0),
Statement::CreateUser(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Statement::Vacuum(__self_0), Statement::Vacuum(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::hash::Hash for Statement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Statement::Analyze {
table_name: __self_0,
partitions: __self_1,
for_columns: __self_2,
columns: __self_3,
cache_metadata: __self_4,
noscan: __self_5,
compute_statistics: __self_6,
has_table_keyword: __self_7 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state)
}
Statement::Set(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Truncate {
table_names: __self_0,
partitions: __self_1,
table: __self_2,
identity: __self_3,
cascade: __self_4,
on_cluster: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::Msck {
table_name: __self_0,
repair: __self_1,
partition_action: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::Query(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Insert(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Install { extension_name: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::Load { extension_name: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::Directory {
overwrite: __self_0,
local: __self_1,
path: __self_2,
file_format: __self_3,
source: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::Case(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::If(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::While(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Raise(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Call(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Copy {
source: __self_0,
to: __self_1,
target: __self_2,
options: __self_3,
legacy_options: __self_4,
values: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::CopyIntoSnowflake {
kind: __self_0,
into: __self_1,
into_columns: __self_2,
from_obj: __self_3,
from_obj_alias: __self_4,
stage_params: __self_5,
from_transformations: __self_6,
from_query: __self_7,
files: __self_8,
pattern: __self_9,
file_format: __self_10,
copy_options: __self_11,
validation_mode: __self_12,
partition: __self_13 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state);
::core::hash::Hash::hash(__self_8, state);
::core::hash::Hash::hash(__self_9, state);
::core::hash::Hash::hash(__self_10, state);
::core::hash::Hash::hash(__self_11, state);
::core::hash::Hash::hash(__self_12, state);
::core::hash::Hash::hash(__self_13, state)
}
Statement::Open(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Close { cursor: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::Update {
table: __self_0,
assignments: __self_1,
from: __self_2,
selection: __self_3,
returning: __self_4,
or: __self_5,
limit: __self_6 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state)
}
Statement::Delete(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateView {
or_alter: __self_0,
or_replace: __self_1,
materialized: __self_2,
secure: __self_3,
name: __self_4,
name_before_not_exists: __self_5,
columns: __self_6,
query: __self_7,
options: __self_8,
cluster_by: __self_9,
comment: __self_10,
with_no_schema_binding: __self_11,
if_not_exists: __self_12,
temporary: __self_13,
to: __self_14,
params: __self_15 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state);
::core::hash::Hash::hash(__self_8, state);
::core::hash::Hash::hash(__self_9, state);
::core::hash::Hash::hash(__self_10, state);
::core::hash::Hash::hash(__self_11, state);
::core::hash::Hash::hash(__self_12, state);
::core::hash::Hash::hash(__self_13, state);
::core::hash::Hash::hash(__self_14, state);
::core::hash::Hash::hash(__self_15, state)
}
Statement::CreateTable(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateVirtualTable {
name: __self_0,
if_not_exists: __self_1,
module_name: __self_2,
module_args: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::CreateIndex(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateRole {
names: __self_0,
if_not_exists: __self_1,
login: __self_2,
inherit: __self_3,
bypassrls: __self_4,
password: __self_5,
superuser: __self_6,
create_db: __self_7,
create_role: __self_8,
replication: __self_9,
connection_limit: __self_10,
valid_until: __self_11,
in_role: __self_12,
in_group: __self_13,
role: __self_14,
user: __self_15,
admin: __self_16,
authorization_owner: __self_17 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state);
::core::hash::Hash::hash(__self_8, state);
::core::hash::Hash::hash(__self_9, state);
::core::hash::Hash::hash(__self_10, state);
::core::hash::Hash::hash(__self_11, state);
::core::hash::Hash::hash(__self_12, state);
::core::hash::Hash::hash(__self_13, state);
::core::hash::Hash::hash(__self_14, state);
::core::hash::Hash::hash(__self_15, state);
::core::hash::Hash::hash(__self_16, state);
::core::hash::Hash::hash(__self_17, state)
}
Statement::CreateSecret {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
storage_specifier: __self_4,
secret_type: __self_5,
options: __self_6 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state)
}
Statement::CreateServer(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreatePolicy {
name: __self_0,
table_name: __self_1,
policy_type: __self_2,
command: __self_3,
to: __self_4,
using: __self_5,
with_check: __self_6 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state)
}
Statement::CreateConnector(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::AlterTable {
name: __self_0,
if_exists: __self_1,
only: __self_2,
operations: __self_3,
location: __self_4,
on_cluster: __self_5,
iceberg: __self_6,
end_token: __self_7 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state)
}
Statement::AlterSchema(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::AlterIndex { name: __self_0, operation: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::AlterView {
name: __self_0,
columns: __self_1,
query: __self_2,
with_options: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::AlterType(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::AlterRole { name: __self_0, operation: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::AlterPolicy {
name: __self_0, table_name: __self_1, operation: __self_2 } =>
{
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::AlterConnector {
name: __self_0,
properties: __self_1,
url: __self_2,
owner: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::AlterSession { set: __self_0, session_params: __self_1
} => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::AttachDatabase {
schema_name: __self_0,
database_file_name: __self_1,
database: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::AttachDuckDBDatabase {
if_not_exists: __self_0,
database: __self_1,
database_path: __self_2,
database_alias: __self_3,
attach_options: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::DetachDuckDBDatabase {
if_exists: __self_0,
database: __self_1,
database_alias: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::Drop {
object_type: __self_0,
if_exists: __self_1,
names: __self_2,
cascade: __self_3,
restrict: __self_4,
purge: __self_5,
temporary: __self_6,
table: __self_7 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state)
}
Statement::DropFunction {
if_exists: __self_0,
func_desc: __self_1,
drop_behavior: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::DropDomain(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::DropProcedure {
if_exists: __self_0,
proc_desc: __self_1,
drop_behavior: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::DropSecret {
if_exists: __self_0,
temporary: __self_1,
name: __self_2,
storage_specifier: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::DropPolicy {
if_exists: __self_0,
name: __self_1,
table_name: __self_2,
drop_behavior: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::DropConnector { if_exists: __self_0, name: __self_1 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::Declare { stmts: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateExtension {
name: __self_0,
if_not_exists: __self_1,
cascade: __self_2,
schema: __self_3,
version: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::DropExtension {
names: __self_0,
if_exists: __self_1,
cascade_or_restrict: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::Fetch {
name: __self_0,
direction: __self_1,
position: __self_2,
into: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::Flush {
object_type: __self_0,
location: __self_1,
channel: __self_2,
read_lock: __self_3,
export: __self_4,
tables: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::Discard { object_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::ShowFunctions { filter: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::ShowVariable { variable: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::ShowStatus {
filter: __self_0, global: __self_1, session: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::ShowVariables {
filter: __self_0, global: __self_1, session: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::ShowCreate { obj_type: __self_0, obj_name: __self_1 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::ShowColumns {
extended: __self_0, full: __self_1, show_options: __self_2 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::ShowDatabases {
terse: __self_0, history: __self_1, show_options: __self_2 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::ShowSchemas {
terse: __self_0, history: __self_1, show_options: __self_2 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::ShowCharset(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::ShowObjects(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::ShowTables {
terse: __self_0,
history: __self_1,
extended: __self_2,
full: __self_3,
external: __self_4,
show_options: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::ShowViews {
terse: __self_0,
materialized: __self_1,
show_options: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::ShowCollation { filter: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::Use(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::StartTransaction {
modes: __self_0,
begin: __self_1,
transaction: __self_2,
modifier: __self_3,
statements: __self_4,
exception: __self_5,
has_end_keyword: __self_6 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state)
}
Statement::Comment {
object_type: __self_0,
object_name: __self_1,
comment: __self_2,
if_exists: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::Commit {
chain: __self_0, end: __self_1, modifier: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::Rollback { chain: __self_0, savepoint: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::CreateSchema {
schema_name: __self_0,
if_not_exists: __self_1,
with: __self_2,
options: __self_3,
default_collate_spec: __self_4,
clone: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::CreateDatabase {
db_name: __self_0,
if_not_exists: __self_1,
location: __self_2,
managed_location: __self_3,
or_replace: __self_4,
transient: __self_5,
clone: __self_6,
data_retention_time_in_days: __self_7,
max_data_extension_time_in_days: __self_8,
external_volume: __self_9,
catalog: __self_10,
replace_invalid_characters: __self_11,
default_ddl_collation: __self_12,
storage_serialization_policy: __self_13,
comment: __self_14,
catalog_sync: __self_15,
catalog_sync_namespace_mode: __self_16,
catalog_sync_namespace_flatten_delimiter: __self_17,
with_tags: __self_18,
with_contacts: __self_19 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state);
::core::hash::Hash::hash(__self_8, state);
::core::hash::Hash::hash(__self_9, state);
::core::hash::Hash::hash(__self_10, state);
::core::hash::Hash::hash(__self_11, state);
::core::hash::Hash::hash(__self_12, state);
::core::hash::Hash::hash(__self_13, state);
::core::hash::Hash::hash(__self_14, state);
::core::hash::Hash::hash(__self_15, state);
::core::hash::Hash::hash(__self_16, state);
::core::hash::Hash::hash(__self_17, state);
::core::hash::Hash::hash(__self_18, state);
::core::hash::Hash::hash(__self_19, state)
}
Statement::CreateFunction(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateTrigger(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::DropTrigger(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateProcedure {
or_alter: __self_0,
name: __self_1,
params: __self_2,
language: __self_3,
body: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::CreateMacro {
or_replace: __self_0,
temporary: __self_1,
name: __self_2,
args: __self_3,
definition: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::CreateStage {
or_replace: __self_0,
temporary: __self_1,
if_not_exists: __self_2,
name: __self_3,
stage_params: __self_4,
directory_table_params: __self_5,
file_format: __self_6,
copy_options: __self_7,
comment: __self_8 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state);
::core::hash::Hash::hash(__self_8, state)
}
Statement::Assert { condition: __self_0, message: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::Grant {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
with_grant_option: __self_3,
as_grantor: __self_4,
granted_by: __self_5,
current_grants: __self_6 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state)
}
Statement::Deny(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Revoke {
privileges: __self_0,
objects: __self_1,
grantees: __self_2,
granted_by: __self_3,
cascade: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::Deallocate { name: __self_0, prepare: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::Execute {
name: __self_0,
parameters: __self_1,
has_parentheses: __self_2,
immediate: __self_3,
into: __self_4,
using: __self_5,
output: __self_6,
default: __self_7 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state)
}
Statement::Prepare {
name: __self_0, data_types: __self_1, statement: __self_2 } =>
{
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::Kill { modifier: __self_0, id: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::ExplainTable {
describe_alias: __self_0,
hive_format: __self_1,
has_table_keyword: __self_2,
table_name: __self_3 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state)
}
Statement::Explain {
describe_alias: __self_0,
analyze: __self_1,
verbose: __self_2,
query_plan: __self_3,
estimate: __self_4,
statement: __self_5,
format: __self_6,
options: __self_7 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state);
::core::hash::Hash::hash(__self_6, state);
::core::hash::Hash::hash(__self_7, state)
}
Statement::Savepoint { name: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::ReleaseSavepoint { name: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::Merge {
into: __self_0,
table: __self_1,
source: __self_2,
on: __self_3,
clauses: __self_4,
output: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::Cache {
table_flag: __self_0,
table_name: __self_1,
has_as: __self_2,
options: __self_3,
query: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::UNCache { table_name: __self_0, if_exists: __self_1 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::CreateSequence {
temporary: __self_0,
if_not_exists: __self_1,
name: __self_2,
data_type: __self_3,
sequence_options: __self_4,
owned_by: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::CreateDomain(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateType { name: __self_0, representation: __self_1 }
=> {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::Pragma {
name: __self_0, value: __self_1, is_eq: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
Statement::LockTables { tables: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::Unload {
query: __self_0,
query_text: __self_1,
to: __self_2,
auth: __self_3,
with: __self_4,
options: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::OptimizeTable {
name: __self_0,
on_cluster: __self_1,
partition: __self_2,
include_final: __self_3,
deduplicate: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::LISTEN { channel: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::UNLISTEN { channel: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Statement::NOTIFY { channel: __self_0, payload: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
Statement::LoadData {
local: __self_0,
inpath: __self_1,
overwrite: __self_2,
table_name: __self_3,
partitioned: __self_4,
table_format: __self_5 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state);
::core::hash::Hash::hash(__self_5, state)
}
Statement::RenameTable(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::List(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Remove(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::RaisError {
message: __self_0,
severity: __self_1,
state: __self_2,
arguments: __self_3,
options: __self_4 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state);
::core::hash::Hash::hash(__self_3, state);
::core::hash::Hash::hash(__self_4, state)
}
Statement::Print(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Return(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::ExportData(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::CreateUser(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
Statement::Vacuum(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
3066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3067#[cfg_attr(
3068 feature = "visitor",
3069 derive(impl sqlparser::ast::Visit for Statement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
visitor.pre_visit_statement(self)?;
match self {
Self::Analyze {
table_name,
partitions,
for_columns,
columns,
cache_metadata,
noscan,
compute_statistics,
has_table_keyword } => {
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(partitions, visitor)?;
sqlparser::ast::Visit::visit(for_columns, visitor)?;
sqlparser::ast::Visit::visit(columns, visitor)?;
sqlparser::ast::Visit::visit(cache_metadata, visitor)?;
sqlparser::ast::Visit::visit(noscan, visitor)?;
sqlparser::ast::Visit::visit(compute_statistics, visitor)?;
sqlparser::ast::Visit::visit(has_table_keyword, visitor)?;
}
Self::Set(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Truncate {
table_names, partitions, table, identity, cascade, on_cluster
} => {
sqlparser::ast::Visit::visit(table_names, visitor)?;
sqlparser::ast::Visit::visit(partitions, visitor)?;
sqlparser::ast::Visit::visit(table, visitor)?;
sqlparser::ast::Visit::visit(identity, visitor)?;
sqlparser::ast::Visit::visit(cascade, visitor)?;
sqlparser::ast::Visit::visit(on_cluster, visitor)?;
}
Self::Msck { table_name, repair, partition_action } => {
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(repair, visitor)?;
sqlparser::ast::Visit::visit(partition_action, visitor)?;
}
Self::Query(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Insert(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Install { extension_name } => {
sqlparser::ast::Visit::visit(extension_name, visitor)?;
}
Self::Load { extension_name } => {
sqlparser::ast::Visit::visit(extension_name, visitor)?;
}
Self::Directory { overwrite, local, path, file_format, source } =>
{
sqlparser::ast::Visit::visit(overwrite, visitor)?;
sqlparser::ast::Visit::visit(local, visitor)?;
sqlparser::ast::Visit::visit(path, visitor)?;
sqlparser::ast::Visit::visit(file_format, visitor)?;
sqlparser::ast::Visit::visit(source, visitor)?;
}
Self::Case(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::If(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::While(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Raise(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Call(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Copy { source, to, target, options, legacy_options, values }
=> {
sqlparser::ast::Visit::visit(source, visitor)?;
sqlparser::ast::Visit::visit(to, visitor)?;
sqlparser::ast::Visit::visit(target, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
sqlparser::ast::Visit::visit(legacy_options, visitor)?;
sqlparser::ast::Visit::visit(values, visitor)?;
}
Self::CopyIntoSnowflake {
kind,
into,
into_columns,
from_obj,
from_obj_alias,
stage_params,
from_transformations,
from_query,
files,
pattern,
file_format,
copy_options,
validation_mode,
partition } => {
sqlparser::ast::Visit::visit(kind, visitor)?;
sqlparser::ast::Visit::visit(into, visitor)?;
sqlparser::ast::Visit::visit(into_columns, visitor)?;
sqlparser::ast::Visit::visit(from_obj, visitor)?;
sqlparser::ast::Visit::visit(from_obj_alias, visitor)?;
sqlparser::ast::Visit::visit(stage_params, visitor)?;
sqlparser::ast::Visit::visit(from_transformations, visitor)?;
sqlparser::ast::Visit::visit(from_query, visitor)?;
sqlparser::ast::Visit::visit(files, visitor)?;
sqlparser::ast::Visit::visit(pattern, visitor)?;
sqlparser::ast::Visit::visit(file_format, visitor)?;
sqlparser::ast::Visit::visit(copy_options, visitor)?;
sqlparser::ast::Visit::visit(validation_mode, visitor)?;
sqlparser::ast::Visit::visit(partition, visitor)?;
}
Self::Open(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Close { cursor } => {
sqlparser::ast::Visit::visit(cursor, visitor)?;
}
Self::Update {
table, assignments, from, selection, returning, or, limit } =>
{
sqlparser::ast::Visit::visit(table, visitor)?;
sqlparser::ast::Visit::visit(assignments, visitor)?;
sqlparser::ast::Visit::visit(from, visitor)?;
sqlparser::ast::Visit::visit(selection, visitor)?;
sqlparser::ast::Visit::visit(returning, visitor)?;
sqlparser::ast::Visit::visit(or, visitor)?;
sqlparser::ast::Visit::visit(limit, visitor)?;
}
Self::Delete(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateView {
or_alter,
or_replace,
materialized,
secure,
name,
name_before_not_exists,
columns,
query,
options,
cluster_by,
comment,
with_no_schema_binding,
if_not_exists,
temporary,
to,
params } => {
sqlparser::ast::Visit::visit(or_alter, visitor)?;
sqlparser::ast::Visit::visit(or_replace, visitor)?;
sqlparser::ast::Visit::visit(materialized, visitor)?;
sqlparser::ast::Visit::visit(secure, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(name_before_not_exists,
visitor)?;
sqlparser::ast::Visit::visit(columns, visitor)?;
sqlparser::ast::Visit::visit(query, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
sqlparser::ast::Visit::visit(cluster_by, visitor)?;
sqlparser::ast::Visit::visit(comment, visitor)?;
sqlparser::ast::Visit::visit(with_no_schema_binding,
visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(to, visitor)?;
sqlparser::ast::Visit::visit(params, visitor)?;
}
Self::CreateTable(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateVirtualTable {
name, if_not_exists, module_name, module_args } => {
visitor.pre_visit_relation(name)?;
sqlparser::ast::Visit::visit(name, visitor)?;
visitor.post_visit_relation(name)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(module_name, visitor)?;
sqlparser::ast::Visit::visit(module_args, visitor)?;
}
Self::CreateIndex(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateRole {
names,
if_not_exists,
login,
inherit,
bypassrls,
password,
superuser,
create_db,
create_role,
replication,
connection_limit,
valid_until,
in_role,
in_group,
role,
user,
admin,
authorization_owner } => {
sqlparser::ast::Visit::visit(names, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(login, visitor)?;
sqlparser::ast::Visit::visit(inherit, visitor)?;
sqlparser::ast::Visit::visit(bypassrls, visitor)?;
sqlparser::ast::Visit::visit(password, visitor)?;
sqlparser::ast::Visit::visit(superuser, visitor)?;
sqlparser::ast::Visit::visit(create_db, visitor)?;
sqlparser::ast::Visit::visit(create_role, visitor)?;
sqlparser::ast::Visit::visit(replication, visitor)?;
sqlparser::ast::Visit::visit(connection_limit, visitor)?;
sqlparser::ast::Visit::visit(valid_until, visitor)?;
sqlparser::ast::Visit::visit(in_role, visitor)?;
sqlparser::ast::Visit::visit(in_group, visitor)?;
sqlparser::ast::Visit::visit(role, visitor)?;
sqlparser::ast::Visit::visit(user, visitor)?;
sqlparser::ast::Visit::visit(admin, visitor)?;
sqlparser::ast::Visit::visit(authorization_owner, visitor)?;
}
Self::CreateSecret {
or_replace,
temporary,
if_not_exists,
name,
storage_specifier,
secret_type,
options } => {
sqlparser::ast::Visit::visit(or_replace, visitor)?;
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(storage_specifier, visitor)?;
sqlparser::ast::Visit::visit(secret_type, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
}
Self::CreateServer(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreatePolicy {
name, table_name, policy_type, command, to, using, with_check
} => {
sqlparser::ast::Visit::visit(name, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(policy_type, visitor)?;
sqlparser::ast::Visit::visit(command, visitor)?;
sqlparser::ast::Visit::visit(to, visitor)?;
sqlparser::ast::Visit::visit(using, visitor)?;
sqlparser::ast::Visit::visit(with_check, visitor)?;
}
Self::CreateConnector(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AlterTable {
name,
if_exists,
only,
operations,
location,
on_cluster,
iceberg,
end_token } => {
visitor.pre_visit_relation(name)?;
sqlparser::ast::Visit::visit(name, visitor)?;
visitor.post_visit_relation(name)?;
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(only, visitor)?;
sqlparser::ast::Visit::visit(operations, visitor)?;
sqlparser::ast::Visit::visit(location, visitor)?;
sqlparser::ast::Visit::visit(on_cluster, visitor)?;
sqlparser::ast::Visit::visit(iceberg, visitor)?;
sqlparser::ast::Visit::visit(end_token, visitor)?;
}
Self::AlterSchema(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AlterIndex { name, operation } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(operation, visitor)?;
}
Self::AlterView { name, columns, query, with_options } => {
visitor.pre_visit_relation(name)?;
sqlparser::ast::Visit::visit(name, visitor)?;
visitor.post_visit_relation(name)?;
sqlparser::ast::Visit::visit(columns, visitor)?;
sqlparser::ast::Visit::visit(query, visitor)?;
sqlparser::ast::Visit::visit(with_options, visitor)?;
}
Self::AlterType(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AlterRole { name, operation } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(operation, visitor)?;
}
Self::AlterPolicy { name, table_name, operation } => {
sqlparser::ast::Visit::visit(name, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(operation, visitor)?;
}
Self::AlterConnector { name, properties, url, owner } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(properties, visitor)?;
sqlparser::ast::Visit::visit(url, visitor)?;
sqlparser::ast::Visit::visit(owner, visitor)?;
}
Self::AlterSession { set, session_params } => {
sqlparser::ast::Visit::visit(set, visitor)?;
sqlparser::ast::Visit::visit(session_params, visitor)?;
}
Self::AttachDatabase { schema_name, database_file_name, database }
=> {
sqlparser::ast::Visit::visit(schema_name, visitor)?;
sqlparser::ast::Visit::visit(database_file_name, visitor)?;
sqlparser::ast::Visit::visit(database, visitor)?;
}
Self::AttachDuckDBDatabase {
if_not_exists,
database,
database_path,
database_alias,
attach_options } => {
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(database, visitor)?;
sqlparser::ast::Visit::visit(database_path, visitor)?;
sqlparser::ast::Visit::visit(database_alias, visitor)?;
sqlparser::ast::Visit::visit(attach_options, visitor)?;
}
Self::DetachDuckDBDatabase { if_exists, database, database_alias }
=> {
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(database, visitor)?;
sqlparser::ast::Visit::visit(database_alias, visitor)?;
}
Self::Drop {
object_type,
if_exists,
names,
cascade,
restrict,
purge,
temporary,
table } => {
sqlparser::ast::Visit::visit(object_type, visitor)?;
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(names, visitor)?;
sqlparser::ast::Visit::visit(cascade, visitor)?;
sqlparser::ast::Visit::visit(restrict, visitor)?;
sqlparser::ast::Visit::visit(purge, visitor)?;
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(table, visitor)?;
}
Self::DropFunction { if_exists, func_desc, drop_behavior } => {
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(func_desc, visitor)?;
sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
}
Self::DropDomain(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::DropProcedure { if_exists, proc_desc, drop_behavior } => {
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(proc_desc, visitor)?;
sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
}
Self::DropSecret { if_exists, temporary, name, storage_specifier }
=> {
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(storage_specifier, visitor)?;
}
Self::DropPolicy { if_exists, name, table_name, drop_behavior } =>
{
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
}
Self::DropConnector { if_exists, name } => {
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
}
Self::Declare { stmts } => {
sqlparser::ast::Visit::visit(stmts, visitor)?;
}
Self::CreateExtension {
name, if_not_exists, cascade, schema, version } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(cascade, visitor)?;
sqlparser::ast::Visit::visit(schema, visitor)?;
sqlparser::ast::Visit::visit(version, visitor)?;
}
Self::DropExtension { names, if_exists, cascade_or_restrict } => {
sqlparser::ast::Visit::visit(names, visitor)?;
sqlparser::ast::Visit::visit(if_exists, visitor)?;
sqlparser::ast::Visit::visit(cascade_or_restrict, visitor)?;
}
Self::Fetch { name, direction, position, into } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(direction, visitor)?;
sqlparser::ast::Visit::visit(position, visitor)?;
sqlparser::ast::Visit::visit(into, visitor)?;
}
Self::Flush {
object_type, location, channel, read_lock, export, tables } =>
{
sqlparser::ast::Visit::visit(object_type, visitor)?;
sqlparser::ast::Visit::visit(location, visitor)?;
sqlparser::ast::Visit::visit(channel, visitor)?;
sqlparser::ast::Visit::visit(read_lock, visitor)?;
sqlparser::ast::Visit::visit(export, visitor)?;
sqlparser::ast::Visit::visit(tables, visitor)?;
}
Self::Discard { object_type } => {
sqlparser::ast::Visit::visit(object_type, visitor)?;
}
Self::ShowFunctions { filter } => {
sqlparser::ast::Visit::visit(filter, visitor)?;
}
Self::ShowVariable { variable } => {
sqlparser::ast::Visit::visit(variable, visitor)?;
}
Self::ShowStatus { filter, global, session } => {
sqlparser::ast::Visit::visit(filter, visitor)?;
sqlparser::ast::Visit::visit(global, visitor)?;
sqlparser::ast::Visit::visit(session, visitor)?;
}
Self::ShowVariables { filter, global, session } => {
sqlparser::ast::Visit::visit(filter, visitor)?;
sqlparser::ast::Visit::visit(global, visitor)?;
sqlparser::ast::Visit::visit(session, visitor)?;
}
Self::ShowCreate { obj_type, obj_name } => {
sqlparser::ast::Visit::visit(obj_type, visitor)?;
sqlparser::ast::Visit::visit(obj_name, visitor)?;
}
Self::ShowColumns { extended, full, show_options } => {
sqlparser::ast::Visit::visit(extended, visitor)?;
sqlparser::ast::Visit::visit(full, visitor)?;
sqlparser::ast::Visit::visit(show_options, visitor)?;
}
Self::ShowDatabases { terse, history, show_options } => {
sqlparser::ast::Visit::visit(terse, visitor)?;
sqlparser::ast::Visit::visit(history, visitor)?;
sqlparser::ast::Visit::visit(show_options, visitor)?;
}
Self::ShowSchemas { terse, history, show_options } => {
sqlparser::ast::Visit::visit(terse, visitor)?;
sqlparser::ast::Visit::visit(history, visitor)?;
sqlparser::ast::Visit::visit(show_options, visitor)?;
}
Self::ShowCharset(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ShowObjects(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ShowTables {
terse, history, extended, full, external, show_options } => {
sqlparser::ast::Visit::visit(terse, visitor)?;
sqlparser::ast::Visit::visit(history, visitor)?;
sqlparser::ast::Visit::visit(extended, visitor)?;
sqlparser::ast::Visit::visit(full, visitor)?;
sqlparser::ast::Visit::visit(external, visitor)?;
sqlparser::ast::Visit::visit(show_options, visitor)?;
}
Self::ShowViews { terse, materialized, show_options } => {
sqlparser::ast::Visit::visit(terse, visitor)?;
sqlparser::ast::Visit::visit(materialized, visitor)?;
sqlparser::ast::Visit::visit(show_options, visitor)?;
}
Self::ShowCollation { filter } => {
sqlparser::ast::Visit::visit(filter, visitor)?;
}
Self::Use(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::StartTransaction {
modes,
begin,
transaction,
modifier,
statements,
exception,
has_end_keyword } => {
sqlparser::ast::Visit::visit(modes, visitor)?;
sqlparser::ast::Visit::visit(begin, visitor)?;
sqlparser::ast::Visit::visit(transaction, visitor)?;
sqlparser::ast::Visit::visit(modifier, visitor)?;
sqlparser::ast::Visit::visit(statements, visitor)?;
sqlparser::ast::Visit::visit(exception, visitor)?;
sqlparser::ast::Visit::visit(has_end_keyword, visitor)?;
}
Self::Comment { object_type, object_name, comment, if_exists } =>
{
sqlparser::ast::Visit::visit(object_type, visitor)?;
sqlparser::ast::Visit::visit(object_name, visitor)?;
sqlparser::ast::Visit::visit(comment, visitor)?;
sqlparser::ast::Visit::visit(if_exists, visitor)?;
}
Self::Commit { chain, end, modifier } => {
sqlparser::ast::Visit::visit(chain, visitor)?;
sqlparser::ast::Visit::visit(end, visitor)?;
sqlparser::ast::Visit::visit(modifier, visitor)?;
}
Self::Rollback { chain, savepoint } => {
sqlparser::ast::Visit::visit(chain, visitor)?;
sqlparser::ast::Visit::visit(savepoint, visitor)?;
}
Self::CreateSchema {
schema_name,
if_not_exists,
with,
options,
default_collate_spec,
clone } => {
sqlparser::ast::Visit::visit(schema_name, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(with, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
sqlparser::ast::Visit::visit(default_collate_spec, visitor)?;
sqlparser::ast::Visit::visit(clone, visitor)?;
}
Self::CreateDatabase {
db_name,
if_not_exists,
location,
managed_location,
or_replace,
transient,
clone,
data_retention_time_in_days,
max_data_extension_time_in_days,
external_volume,
catalog,
replace_invalid_characters,
default_ddl_collation,
storage_serialization_policy,
comment,
catalog_sync,
catalog_sync_namespace_mode,
catalog_sync_namespace_flatten_delimiter,
with_tags,
with_contacts } => {
sqlparser::ast::Visit::visit(db_name, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(location, visitor)?;
sqlparser::ast::Visit::visit(managed_location, visitor)?;
sqlparser::ast::Visit::visit(or_replace, visitor)?;
sqlparser::ast::Visit::visit(transient, visitor)?;
sqlparser::ast::Visit::visit(clone, visitor)?;
sqlparser::ast::Visit::visit(data_retention_time_in_days,
visitor)?;
sqlparser::ast::Visit::visit(max_data_extension_time_in_days,
visitor)?;
sqlparser::ast::Visit::visit(external_volume, visitor)?;
sqlparser::ast::Visit::visit(catalog, visitor)?;
sqlparser::ast::Visit::visit(replace_invalid_characters,
visitor)?;
sqlparser::ast::Visit::visit(default_ddl_collation, visitor)?;
sqlparser::ast::Visit::visit(storage_serialization_policy,
visitor)?;
sqlparser::ast::Visit::visit(comment, visitor)?;
sqlparser::ast::Visit::visit(catalog_sync, visitor)?;
sqlparser::ast::Visit::visit(catalog_sync_namespace_mode,
visitor)?;
sqlparser::ast::Visit::visit(catalog_sync_namespace_flatten_delimiter,
visitor)?;
sqlparser::ast::Visit::visit(with_tags, visitor)?;
sqlparser::ast::Visit::visit(with_contacts, visitor)?;
}
Self::CreateFunction(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateTrigger(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::DropTrigger(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateProcedure { or_alter, name, params, language, body }
=> {
sqlparser::ast::Visit::visit(or_alter, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(params, visitor)?;
sqlparser::ast::Visit::visit(language, visitor)?;
sqlparser::ast::Visit::visit(body, visitor)?;
}
Self::CreateMacro { or_replace, temporary, name, args, definition
} => {
sqlparser::ast::Visit::visit(or_replace, visitor)?;
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(args, visitor)?;
sqlparser::ast::Visit::visit(definition, visitor)?;
}
Self::CreateStage {
or_replace,
temporary,
if_not_exists,
name,
stage_params,
directory_table_params,
file_format,
copy_options,
comment } => {
sqlparser::ast::Visit::visit(or_replace, visitor)?;
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(stage_params, visitor)?;
sqlparser::ast::Visit::visit(directory_table_params,
visitor)?;
sqlparser::ast::Visit::visit(file_format, visitor)?;
sqlparser::ast::Visit::visit(copy_options, visitor)?;
sqlparser::ast::Visit::visit(comment, visitor)?;
}
Self::Assert { condition, message } => {
sqlparser::ast::Visit::visit(condition, visitor)?;
sqlparser::ast::Visit::visit(message, visitor)?;
}
Self::Grant {
privileges,
objects,
grantees,
with_grant_option,
as_grantor,
granted_by,
current_grants } => {
sqlparser::ast::Visit::visit(privileges, visitor)?;
sqlparser::ast::Visit::visit(objects, visitor)?;
sqlparser::ast::Visit::visit(grantees, visitor)?;
sqlparser::ast::Visit::visit(with_grant_option, visitor)?;
sqlparser::ast::Visit::visit(as_grantor, visitor)?;
sqlparser::ast::Visit::visit(granted_by, visitor)?;
sqlparser::ast::Visit::visit(current_grants, visitor)?;
}
Self::Deny(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Revoke { privileges, objects, grantees, granted_by, cascade
} => {
sqlparser::ast::Visit::visit(privileges, visitor)?;
sqlparser::ast::Visit::visit(objects, visitor)?;
sqlparser::ast::Visit::visit(grantees, visitor)?;
sqlparser::ast::Visit::visit(granted_by, visitor)?;
sqlparser::ast::Visit::visit(cascade, visitor)?;
}
Self::Deallocate { name, prepare } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(prepare, visitor)?;
}
Self::Execute {
name,
parameters,
has_parentheses,
immediate,
into,
using,
output,
default } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(parameters, visitor)?;
sqlparser::ast::Visit::visit(has_parentheses, visitor)?;
sqlparser::ast::Visit::visit(immediate, visitor)?;
sqlparser::ast::Visit::visit(into, visitor)?;
sqlparser::ast::Visit::visit(using, visitor)?;
sqlparser::ast::Visit::visit(output, visitor)?;
sqlparser::ast::Visit::visit(default, visitor)?;
}
Self::Prepare { name, data_types, statement } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(data_types, visitor)?;
sqlparser::ast::Visit::visit(statement, visitor)?;
}
Self::Kill { modifier, id } => {
sqlparser::ast::Visit::visit(modifier, visitor)?;
sqlparser::ast::Visit::visit(id, visitor)?;
}
Self::ExplainTable {
describe_alias, hive_format, has_table_keyword, table_name }
=> {
sqlparser::ast::Visit::visit(describe_alias, visitor)?;
sqlparser::ast::Visit::visit(hive_format, visitor)?;
sqlparser::ast::Visit::visit(has_table_keyword, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
}
Self::Explain {
describe_alias,
analyze,
verbose,
query_plan,
estimate,
statement,
format,
options } => {
sqlparser::ast::Visit::visit(describe_alias, visitor)?;
sqlparser::ast::Visit::visit(analyze, visitor)?;
sqlparser::ast::Visit::visit(verbose, visitor)?;
sqlparser::ast::Visit::visit(query_plan, visitor)?;
sqlparser::ast::Visit::visit(estimate, visitor)?;
sqlparser::ast::Visit::visit(statement, visitor)?;
sqlparser::ast::Visit::visit(format, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
}
Self::Savepoint { name } => {
sqlparser::ast::Visit::visit(name, visitor)?;
}
Self::ReleaseSavepoint { name } => {
sqlparser::ast::Visit::visit(name, visitor)?;
}
Self::Merge { into, table, source, on, clauses, output } => {
sqlparser::ast::Visit::visit(into, visitor)?;
sqlparser::ast::Visit::visit(table, visitor)?;
sqlparser::ast::Visit::visit(source, visitor)?;
sqlparser::ast::Visit::visit(on, visitor)?;
sqlparser::ast::Visit::visit(clauses, visitor)?;
sqlparser::ast::Visit::visit(output, visitor)?;
}
Self::Cache { table_flag, table_name, has_as, options, query } =>
{
sqlparser::ast::Visit::visit(table_flag, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(has_as, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
sqlparser::ast::Visit::visit(query, visitor)?;
}
Self::UNCache { table_name, if_exists } => {
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::Visit::visit(if_exists, visitor)?;
}
Self::CreateSequence {
temporary,
if_not_exists,
name,
data_type,
sequence_options,
owned_by } => {
sqlparser::ast::Visit::visit(temporary, visitor)?;
sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(data_type, visitor)?;
sqlparser::ast::Visit::visit(sequence_options, visitor)?;
sqlparser::ast::Visit::visit(owned_by, visitor)?;
}
Self::CreateDomain(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateType { name, representation } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(representation, visitor)?;
}
Self::Pragma { name, value, is_eq } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(value, visitor)?;
sqlparser::ast::Visit::visit(is_eq, visitor)?;
}
Self::LockTables { tables } => {
sqlparser::ast::Visit::visit(tables, visitor)?;
}
Self::UnlockTables => {}
Self::Unload { query, query_text, to, auth, with, options } => {
sqlparser::ast::Visit::visit(query, visitor)?;
sqlparser::ast::Visit::visit(query_text, visitor)?;
sqlparser::ast::Visit::visit(to, visitor)?;
sqlparser::ast::Visit::visit(auth, visitor)?;
sqlparser::ast::Visit::visit(with, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
}
Self::OptimizeTable {
name, on_cluster, partition, include_final, deduplicate } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(on_cluster, visitor)?;
sqlparser::ast::Visit::visit(partition, visitor)?;
sqlparser::ast::Visit::visit(include_final, visitor)?;
sqlparser::ast::Visit::visit(deduplicate, visitor)?;
}
Self::LISTEN { channel } => {
sqlparser::ast::Visit::visit(channel, visitor)?;
}
Self::UNLISTEN { channel } => {
sqlparser::ast::Visit::visit(channel, visitor)?;
}
Self::NOTIFY { channel, payload } => {
sqlparser::ast::Visit::visit(channel, visitor)?;
sqlparser::ast::Visit::visit(payload, visitor)?;
}
Self::LoadData {
local,
inpath,
overwrite,
table_name,
partitioned,
table_format } => {
sqlparser::ast::Visit::visit(local, visitor)?;
sqlparser::ast::Visit::visit(inpath, visitor)?;
sqlparser::ast::Visit::visit(overwrite, visitor)?;
sqlparser::ast::Visit::visit(table_name, visitor)?;
sqlparser::ast::Visit::visit(partitioned, visitor)?;
sqlparser::ast::Visit::visit(table_format, visitor)?;
}
Self::RenameTable(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::List(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Remove(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::RaisError { message, severity, state, arguments, options }
=> {
sqlparser::ast::Visit::visit(message, visitor)?;
sqlparser::ast::Visit::visit(severity, visitor)?;
sqlparser::ast::Visit::visit(state, visitor)?;
sqlparser::ast::Visit::visit(arguments, visitor)?;
sqlparser::ast::Visit::visit(options, visitor)?;
}
Self::Print(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Return(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ExportData(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::CreateUser(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Vacuum(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
visitor.post_visit_statement(self)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Statement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
visitor.pre_visit_statement(self)?;
match self {
Self::Analyze {
table_name,
partitions,
for_columns,
columns,
cache_metadata,
noscan,
compute_statistics,
has_table_keyword } => {
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(partitions, visitor)?;
sqlparser::ast::VisitMut::visit(for_columns, visitor)?;
sqlparser::ast::VisitMut::visit(columns, visitor)?;
sqlparser::ast::VisitMut::visit(cache_metadata, visitor)?;
sqlparser::ast::VisitMut::visit(noscan, visitor)?;
sqlparser::ast::VisitMut::visit(compute_statistics, visitor)?;
sqlparser::ast::VisitMut::visit(has_table_keyword, visitor)?;
}
Self::Set(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Truncate {
table_names, partitions, table, identity, cascade, on_cluster
} => {
sqlparser::ast::VisitMut::visit(table_names, visitor)?;
sqlparser::ast::VisitMut::visit(partitions, visitor)?;
sqlparser::ast::VisitMut::visit(table, visitor)?;
sqlparser::ast::VisitMut::visit(identity, visitor)?;
sqlparser::ast::VisitMut::visit(cascade, visitor)?;
sqlparser::ast::VisitMut::visit(on_cluster, visitor)?;
}
Self::Msck { table_name, repair, partition_action } => {
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(repair, visitor)?;
sqlparser::ast::VisitMut::visit(partition_action, visitor)?;
}
Self::Query(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Insert(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Install { extension_name } => {
sqlparser::ast::VisitMut::visit(extension_name, visitor)?;
}
Self::Load { extension_name } => {
sqlparser::ast::VisitMut::visit(extension_name, visitor)?;
}
Self::Directory { overwrite, local, path, file_format, source } =>
{
sqlparser::ast::VisitMut::visit(overwrite, visitor)?;
sqlparser::ast::VisitMut::visit(local, visitor)?;
sqlparser::ast::VisitMut::visit(path, visitor)?;
sqlparser::ast::VisitMut::visit(file_format, visitor)?;
sqlparser::ast::VisitMut::visit(source, visitor)?;
}
Self::Case(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::If(_0) => { sqlparser::ast::VisitMut::visit(_0, visitor)?; }
Self::While(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Raise(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Call(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Copy { source, to, target, options, legacy_options, values }
=> {
sqlparser::ast::VisitMut::visit(source, visitor)?;
sqlparser::ast::VisitMut::visit(to, visitor)?;
sqlparser::ast::VisitMut::visit(target, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
sqlparser::ast::VisitMut::visit(legacy_options, visitor)?;
sqlparser::ast::VisitMut::visit(values, visitor)?;
}
Self::CopyIntoSnowflake {
kind,
into,
into_columns,
from_obj,
from_obj_alias,
stage_params,
from_transformations,
from_query,
files,
pattern,
file_format,
copy_options,
validation_mode,
partition } => {
sqlparser::ast::VisitMut::visit(kind, visitor)?;
sqlparser::ast::VisitMut::visit(into, visitor)?;
sqlparser::ast::VisitMut::visit(into_columns, visitor)?;
sqlparser::ast::VisitMut::visit(from_obj, visitor)?;
sqlparser::ast::VisitMut::visit(from_obj_alias, visitor)?;
sqlparser::ast::VisitMut::visit(stage_params, visitor)?;
sqlparser::ast::VisitMut::visit(from_transformations,
visitor)?;
sqlparser::ast::VisitMut::visit(from_query, visitor)?;
sqlparser::ast::VisitMut::visit(files, visitor)?;
sqlparser::ast::VisitMut::visit(pattern, visitor)?;
sqlparser::ast::VisitMut::visit(file_format, visitor)?;
sqlparser::ast::VisitMut::visit(copy_options, visitor)?;
sqlparser::ast::VisitMut::visit(validation_mode, visitor)?;
sqlparser::ast::VisitMut::visit(partition, visitor)?;
}
Self::Open(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Close { cursor } => {
sqlparser::ast::VisitMut::visit(cursor, visitor)?;
}
Self::Update {
table, assignments, from, selection, returning, or, limit } =>
{
sqlparser::ast::VisitMut::visit(table, visitor)?;
sqlparser::ast::VisitMut::visit(assignments, visitor)?;
sqlparser::ast::VisitMut::visit(from, visitor)?;
sqlparser::ast::VisitMut::visit(selection, visitor)?;
sqlparser::ast::VisitMut::visit(returning, visitor)?;
sqlparser::ast::VisitMut::visit(or, visitor)?;
sqlparser::ast::VisitMut::visit(limit, visitor)?;
}
Self::Delete(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateView {
or_alter,
or_replace,
materialized,
secure,
name,
name_before_not_exists,
columns,
query,
options,
cluster_by,
comment,
with_no_schema_binding,
if_not_exists,
temporary,
to,
params } => {
sqlparser::ast::VisitMut::visit(or_alter, visitor)?;
sqlparser::ast::VisitMut::visit(or_replace, visitor)?;
sqlparser::ast::VisitMut::visit(materialized, visitor)?;
sqlparser::ast::VisitMut::visit(secure, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(name_before_not_exists,
visitor)?;
sqlparser::ast::VisitMut::visit(columns, visitor)?;
sqlparser::ast::VisitMut::visit(query, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
sqlparser::ast::VisitMut::visit(cluster_by, visitor)?;
sqlparser::ast::VisitMut::visit(comment, visitor)?;
sqlparser::ast::VisitMut::visit(with_no_schema_binding,
visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(to, visitor)?;
sqlparser::ast::VisitMut::visit(params, visitor)?;
}
Self::CreateTable(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateVirtualTable {
name, if_not_exists, module_name, module_args } => {
visitor.pre_visit_relation(name)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
visitor.post_visit_relation(name)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(module_name, visitor)?;
sqlparser::ast::VisitMut::visit(module_args, visitor)?;
}
Self::CreateIndex(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateRole {
names,
if_not_exists,
login,
inherit,
bypassrls,
password,
superuser,
create_db,
create_role,
replication,
connection_limit,
valid_until,
in_role,
in_group,
role,
user,
admin,
authorization_owner } => {
sqlparser::ast::VisitMut::visit(names, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(login, visitor)?;
sqlparser::ast::VisitMut::visit(inherit, visitor)?;
sqlparser::ast::VisitMut::visit(bypassrls, visitor)?;
sqlparser::ast::VisitMut::visit(password, visitor)?;
sqlparser::ast::VisitMut::visit(superuser, visitor)?;
sqlparser::ast::VisitMut::visit(create_db, visitor)?;
sqlparser::ast::VisitMut::visit(create_role, visitor)?;
sqlparser::ast::VisitMut::visit(replication, visitor)?;
sqlparser::ast::VisitMut::visit(connection_limit, visitor)?;
sqlparser::ast::VisitMut::visit(valid_until, visitor)?;
sqlparser::ast::VisitMut::visit(in_role, visitor)?;
sqlparser::ast::VisitMut::visit(in_group, visitor)?;
sqlparser::ast::VisitMut::visit(role, visitor)?;
sqlparser::ast::VisitMut::visit(user, visitor)?;
sqlparser::ast::VisitMut::visit(admin, visitor)?;
sqlparser::ast::VisitMut::visit(authorization_owner,
visitor)?;
}
Self::CreateSecret {
or_replace,
temporary,
if_not_exists,
name,
storage_specifier,
secret_type,
options } => {
sqlparser::ast::VisitMut::visit(or_replace, visitor)?;
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(storage_specifier, visitor)?;
sqlparser::ast::VisitMut::visit(secret_type, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
}
Self::CreateServer(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreatePolicy {
name, table_name, policy_type, command, to, using, with_check
} => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(policy_type, visitor)?;
sqlparser::ast::VisitMut::visit(command, visitor)?;
sqlparser::ast::VisitMut::visit(to, visitor)?;
sqlparser::ast::VisitMut::visit(using, visitor)?;
sqlparser::ast::VisitMut::visit(with_check, visitor)?;
}
Self::CreateConnector(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AlterTable {
name,
if_exists,
only,
operations,
location,
on_cluster,
iceberg,
end_token } => {
visitor.pre_visit_relation(name)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
visitor.post_visit_relation(name)?;
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(only, visitor)?;
sqlparser::ast::VisitMut::visit(operations, visitor)?;
sqlparser::ast::VisitMut::visit(location, visitor)?;
sqlparser::ast::VisitMut::visit(on_cluster, visitor)?;
sqlparser::ast::VisitMut::visit(iceberg, visitor)?;
sqlparser::ast::VisitMut::visit(end_token, visitor)?;
}
Self::AlterSchema(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AlterIndex { name, operation } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(operation, visitor)?;
}
Self::AlterView { name, columns, query, with_options } => {
visitor.pre_visit_relation(name)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
visitor.post_visit_relation(name)?;
sqlparser::ast::VisitMut::visit(columns, visitor)?;
sqlparser::ast::VisitMut::visit(query, visitor)?;
sqlparser::ast::VisitMut::visit(with_options, visitor)?;
}
Self::AlterType(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AlterRole { name, operation } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(operation, visitor)?;
}
Self::AlterPolicy { name, table_name, operation } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(operation, visitor)?;
}
Self::AlterConnector { name, properties, url, owner } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(properties, visitor)?;
sqlparser::ast::VisitMut::visit(url, visitor)?;
sqlparser::ast::VisitMut::visit(owner, visitor)?;
}
Self::AlterSession { set, session_params } => {
sqlparser::ast::VisitMut::visit(set, visitor)?;
sqlparser::ast::VisitMut::visit(session_params, visitor)?;
}
Self::AttachDatabase { schema_name, database_file_name, database }
=> {
sqlparser::ast::VisitMut::visit(schema_name, visitor)?;
sqlparser::ast::VisitMut::visit(database_file_name, visitor)?;
sqlparser::ast::VisitMut::visit(database, visitor)?;
}
Self::AttachDuckDBDatabase {
if_not_exists,
database,
database_path,
database_alias,
attach_options } => {
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(database, visitor)?;
sqlparser::ast::VisitMut::visit(database_path, visitor)?;
sqlparser::ast::VisitMut::visit(database_alias, visitor)?;
sqlparser::ast::VisitMut::visit(attach_options, visitor)?;
}
Self::DetachDuckDBDatabase { if_exists, database, database_alias }
=> {
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(database, visitor)?;
sqlparser::ast::VisitMut::visit(database_alias, visitor)?;
}
Self::Drop {
object_type,
if_exists,
names,
cascade,
restrict,
purge,
temporary,
table } => {
sqlparser::ast::VisitMut::visit(object_type, visitor)?;
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(names, visitor)?;
sqlparser::ast::VisitMut::visit(cascade, visitor)?;
sqlparser::ast::VisitMut::visit(restrict, visitor)?;
sqlparser::ast::VisitMut::visit(purge, visitor)?;
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(table, visitor)?;
}
Self::DropFunction { if_exists, func_desc, drop_behavior } => {
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(func_desc, visitor)?;
sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
}
Self::DropDomain(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::DropProcedure { if_exists, proc_desc, drop_behavior } => {
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(proc_desc, visitor)?;
sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
}
Self::DropSecret { if_exists, temporary, name, storage_specifier }
=> {
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(storage_specifier, visitor)?;
}
Self::DropPolicy { if_exists, name, table_name, drop_behavior } =>
{
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
}
Self::DropConnector { if_exists, name } => {
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
}
Self::Declare { stmts } => {
sqlparser::ast::VisitMut::visit(stmts, visitor)?;
}
Self::CreateExtension {
name, if_not_exists, cascade, schema, version } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(cascade, visitor)?;
sqlparser::ast::VisitMut::visit(schema, visitor)?;
sqlparser::ast::VisitMut::visit(version, visitor)?;
}
Self::DropExtension { names, if_exists, cascade_or_restrict } => {
sqlparser::ast::VisitMut::visit(names, visitor)?;
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(cascade_or_restrict,
visitor)?;
}
Self::Fetch { name, direction, position, into } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(direction, visitor)?;
sqlparser::ast::VisitMut::visit(position, visitor)?;
sqlparser::ast::VisitMut::visit(into, visitor)?;
}
Self::Flush {
object_type, location, channel, read_lock, export, tables } =>
{
sqlparser::ast::VisitMut::visit(object_type, visitor)?;
sqlparser::ast::VisitMut::visit(location, visitor)?;
sqlparser::ast::VisitMut::visit(channel, visitor)?;
sqlparser::ast::VisitMut::visit(read_lock, visitor)?;
sqlparser::ast::VisitMut::visit(export, visitor)?;
sqlparser::ast::VisitMut::visit(tables, visitor)?;
}
Self::Discard { object_type } => {
sqlparser::ast::VisitMut::visit(object_type, visitor)?;
}
Self::ShowFunctions { filter } => {
sqlparser::ast::VisitMut::visit(filter, visitor)?;
}
Self::ShowVariable { variable } => {
sqlparser::ast::VisitMut::visit(variable, visitor)?;
}
Self::ShowStatus { filter, global, session } => {
sqlparser::ast::VisitMut::visit(filter, visitor)?;
sqlparser::ast::VisitMut::visit(global, visitor)?;
sqlparser::ast::VisitMut::visit(session, visitor)?;
}
Self::ShowVariables { filter, global, session } => {
sqlparser::ast::VisitMut::visit(filter, visitor)?;
sqlparser::ast::VisitMut::visit(global, visitor)?;
sqlparser::ast::VisitMut::visit(session, visitor)?;
}
Self::ShowCreate { obj_type, obj_name } => {
sqlparser::ast::VisitMut::visit(obj_type, visitor)?;
sqlparser::ast::VisitMut::visit(obj_name, visitor)?;
}
Self::ShowColumns { extended, full, show_options } => {
sqlparser::ast::VisitMut::visit(extended, visitor)?;
sqlparser::ast::VisitMut::visit(full, visitor)?;
sqlparser::ast::VisitMut::visit(show_options, visitor)?;
}
Self::ShowDatabases { terse, history, show_options } => {
sqlparser::ast::VisitMut::visit(terse, visitor)?;
sqlparser::ast::VisitMut::visit(history, visitor)?;
sqlparser::ast::VisitMut::visit(show_options, visitor)?;
}
Self::ShowSchemas { terse, history, show_options } => {
sqlparser::ast::VisitMut::visit(terse, visitor)?;
sqlparser::ast::VisitMut::visit(history, visitor)?;
sqlparser::ast::VisitMut::visit(show_options, visitor)?;
}
Self::ShowCharset(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ShowObjects(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ShowTables {
terse, history, extended, full, external, show_options } => {
sqlparser::ast::VisitMut::visit(terse, visitor)?;
sqlparser::ast::VisitMut::visit(history, visitor)?;
sqlparser::ast::VisitMut::visit(extended, visitor)?;
sqlparser::ast::VisitMut::visit(full, visitor)?;
sqlparser::ast::VisitMut::visit(external, visitor)?;
sqlparser::ast::VisitMut::visit(show_options, visitor)?;
}
Self::ShowViews { terse, materialized, show_options } => {
sqlparser::ast::VisitMut::visit(terse, visitor)?;
sqlparser::ast::VisitMut::visit(materialized, visitor)?;
sqlparser::ast::VisitMut::visit(show_options, visitor)?;
}
Self::ShowCollation { filter } => {
sqlparser::ast::VisitMut::visit(filter, visitor)?;
}
Self::Use(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::StartTransaction {
modes,
begin,
transaction,
modifier,
statements,
exception,
has_end_keyword } => {
sqlparser::ast::VisitMut::visit(modes, visitor)?;
sqlparser::ast::VisitMut::visit(begin, visitor)?;
sqlparser::ast::VisitMut::visit(transaction, visitor)?;
sqlparser::ast::VisitMut::visit(modifier, visitor)?;
sqlparser::ast::VisitMut::visit(statements, visitor)?;
sqlparser::ast::VisitMut::visit(exception, visitor)?;
sqlparser::ast::VisitMut::visit(has_end_keyword, visitor)?;
}
Self::Comment { object_type, object_name, comment, if_exists } =>
{
sqlparser::ast::VisitMut::visit(object_type, visitor)?;
sqlparser::ast::VisitMut::visit(object_name, visitor)?;
sqlparser::ast::VisitMut::visit(comment, visitor)?;
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
}
Self::Commit { chain, end, modifier } => {
sqlparser::ast::VisitMut::visit(chain, visitor)?;
sqlparser::ast::VisitMut::visit(end, visitor)?;
sqlparser::ast::VisitMut::visit(modifier, visitor)?;
}
Self::Rollback { chain, savepoint } => {
sqlparser::ast::VisitMut::visit(chain, visitor)?;
sqlparser::ast::VisitMut::visit(savepoint, visitor)?;
}
Self::CreateSchema {
schema_name,
if_not_exists,
with,
options,
default_collate_spec,
clone } => {
sqlparser::ast::VisitMut::visit(schema_name, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(with, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
sqlparser::ast::VisitMut::visit(default_collate_spec,
visitor)?;
sqlparser::ast::VisitMut::visit(clone, visitor)?;
}
Self::CreateDatabase {
db_name,
if_not_exists,
location,
managed_location,
or_replace,
transient,
clone,
data_retention_time_in_days,
max_data_extension_time_in_days,
external_volume,
catalog,
replace_invalid_characters,
default_ddl_collation,
storage_serialization_policy,
comment,
catalog_sync,
catalog_sync_namespace_mode,
catalog_sync_namespace_flatten_delimiter,
with_tags,
with_contacts } => {
sqlparser::ast::VisitMut::visit(db_name, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(location, visitor)?;
sqlparser::ast::VisitMut::visit(managed_location, visitor)?;
sqlparser::ast::VisitMut::visit(or_replace, visitor)?;
sqlparser::ast::VisitMut::visit(transient, visitor)?;
sqlparser::ast::VisitMut::visit(clone, visitor)?;
sqlparser::ast::VisitMut::visit(data_retention_time_in_days,
visitor)?;
sqlparser::ast::VisitMut::visit(max_data_extension_time_in_days,
visitor)?;
sqlparser::ast::VisitMut::visit(external_volume, visitor)?;
sqlparser::ast::VisitMut::visit(catalog, visitor)?;
sqlparser::ast::VisitMut::visit(replace_invalid_characters,
visitor)?;
sqlparser::ast::VisitMut::visit(default_ddl_collation,
visitor)?;
sqlparser::ast::VisitMut::visit(storage_serialization_policy,
visitor)?;
sqlparser::ast::VisitMut::visit(comment, visitor)?;
sqlparser::ast::VisitMut::visit(catalog_sync, visitor)?;
sqlparser::ast::VisitMut::visit(catalog_sync_namespace_mode,
visitor)?;
sqlparser::ast::VisitMut::visit(catalog_sync_namespace_flatten_delimiter,
visitor)?;
sqlparser::ast::VisitMut::visit(with_tags, visitor)?;
sqlparser::ast::VisitMut::visit(with_contacts, visitor)?;
}
Self::CreateFunction(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateTrigger(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::DropTrigger(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateProcedure { or_alter, name, params, language, body }
=> {
sqlparser::ast::VisitMut::visit(or_alter, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(params, visitor)?;
sqlparser::ast::VisitMut::visit(language, visitor)?;
sqlparser::ast::VisitMut::visit(body, visitor)?;
}
Self::CreateMacro { or_replace, temporary, name, args, definition
} => {
sqlparser::ast::VisitMut::visit(or_replace, visitor)?;
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(args, visitor)?;
sqlparser::ast::VisitMut::visit(definition, visitor)?;
}
Self::CreateStage {
or_replace,
temporary,
if_not_exists,
name,
stage_params,
directory_table_params,
file_format,
copy_options,
comment } => {
sqlparser::ast::VisitMut::visit(or_replace, visitor)?;
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(stage_params, visitor)?;
sqlparser::ast::VisitMut::visit(directory_table_params,
visitor)?;
sqlparser::ast::VisitMut::visit(file_format, visitor)?;
sqlparser::ast::VisitMut::visit(copy_options, visitor)?;
sqlparser::ast::VisitMut::visit(comment, visitor)?;
}
Self::Assert { condition, message } => {
sqlparser::ast::VisitMut::visit(condition, visitor)?;
sqlparser::ast::VisitMut::visit(message, visitor)?;
}
Self::Grant {
privileges,
objects,
grantees,
with_grant_option,
as_grantor,
granted_by,
current_grants } => {
sqlparser::ast::VisitMut::visit(privileges, visitor)?;
sqlparser::ast::VisitMut::visit(objects, visitor)?;
sqlparser::ast::VisitMut::visit(grantees, visitor)?;
sqlparser::ast::VisitMut::visit(with_grant_option, visitor)?;
sqlparser::ast::VisitMut::visit(as_grantor, visitor)?;
sqlparser::ast::VisitMut::visit(granted_by, visitor)?;
sqlparser::ast::VisitMut::visit(current_grants, visitor)?;
}
Self::Deny(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Revoke { privileges, objects, grantees, granted_by, cascade
} => {
sqlparser::ast::VisitMut::visit(privileges, visitor)?;
sqlparser::ast::VisitMut::visit(objects, visitor)?;
sqlparser::ast::VisitMut::visit(grantees, visitor)?;
sqlparser::ast::VisitMut::visit(granted_by, visitor)?;
sqlparser::ast::VisitMut::visit(cascade, visitor)?;
}
Self::Deallocate { name, prepare } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(prepare, visitor)?;
}
Self::Execute {
name,
parameters,
has_parentheses,
immediate,
into,
using,
output,
default } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(parameters, visitor)?;
sqlparser::ast::VisitMut::visit(has_parentheses, visitor)?;
sqlparser::ast::VisitMut::visit(immediate, visitor)?;
sqlparser::ast::VisitMut::visit(into, visitor)?;
sqlparser::ast::VisitMut::visit(using, visitor)?;
sqlparser::ast::VisitMut::visit(output, visitor)?;
sqlparser::ast::VisitMut::visit(default, visitor)?;
}
Self::Prepare { name, data_types, statement } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(data_types, visitor)?;
sqlparser::ast::VisitMut::visit(statement, visitor)?;
}
Self::Kill { modifier, id } => {
sqlparser::ast::VisitMut::visit(modifier, visitor)?;
sqlparser::ast::VisitMut::visit(id, visitor)?;
}
Self::ExplainTable {
describe_alias, hive_format, has_table_keyword, table_name }
=> {
sqlparser::ast::VisitMut::visit(describe_alias, visitor)?;
sqlparser::ast::VisitMut::visit(hive_format, visitor)?;
sqlparser::ast::VisitMut::visit(has_table_keyword, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
}
Self::Explain {
describe_alias,
analyze,
verbose,
query_plan,
estimate,
statement,
format,
options } => {
sqlparser::ast::VisitMut::visit(describe_alias, visitor)?;
sqlparser::ast::VisitMut::visit(analyze, visitor)?;
sqlparser::ast::VisitMut::visit(verbose, visitor)?;
sqlparser::ast::VisitMut::visit(query_plan, visitor)?;
sqlparser::ast::VisitMut::visit(estimate, visitor)?;
sqlparser::ast::VisitMut::visit(statement, visitor)?;
sqlparser::ast::VisitMut::visit(format, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
}
Self::Savepoint { name } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
}
Self::ReleaseSavepoint { name } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
}
Self::Merge { into, table, source, on, clauses, output } => {
sqlparser::ast::VisitMut::visit(into, visitor)?;
sqlparser::ast::VisitMut::visit(table, visitor)?;
sqlparser::ast::VisitMut::visit(source, visitor)?;
sqlparser::ast::VisitMut::visit(on, visitor)?;
sqlparser::ast::VisitMut::visit(clauses, visitor)?;
sqlparser::ast::VisitMut::visit(output, visitor)?;
}
Self::Cache { table_flag, table_name, has_as, options, query } =>
{
sqlparser::ast::VisitMut::visit(table_flag, visitor)?;
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(has_as, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
sqlparser::ast::VisitMut::visit(query, visitor)?;
}
Self::UNCache { table_name, if_exists } => {
visitor.pre_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
visitor.post_visit_relation(table_name)?;
sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
}
Self::CreateSequence {
temporary,
if_not_exists,
name,
data_type,
sequence_options,
owned_by } => {
sqlparser::ast::VisitMut::visit(temporary, visitor)?;
sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(data_type, visitor)?;
sqlparser::ast::VisitMut::visit(sequence_options, visitor)?;
sqlparser::ast::VisitMut::visit(owned_by, visitor)?;
}
Self::CreateDomain(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateType { name, representation } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(representation, visitor)?;
}
Self::Pragma { name, value, is_eq } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(value, visitor)?;
sqlparser::ast::VisitMut::visit(is_eq, visitor)?;
}
Self::LockTables { tables } => {
sqlparser::ast::VisitMut::visit(tables, visitor)?;
}
Self::UnlockTables => {}
Self::Unload { query, query_text, to, auth, with, options } => {
sqlparser::ast::VisitMut::visit(query, visitor)?;
sqlparser::ast::VisitMut::visit(query_text, visitor)?;
sqlparser::ast::VisitMut::visit(to, visitor)?;
sqlparser::ast::VisitMut::visit(auth, visitor)?;
sqlparser::ast::VisitMut::visit(with, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
}
Self::OptimizeTable {
name, on_cluster, partition, include_final, deduplicate } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(on_cluster, visitor)?;
sqlparser::ast::VisitMut::visit(partition, visitor)?;
sqlparser::ast::VisitMut::visit(include_final, visitor)?;
sqlparser::ast::VisitMut::visit(deduplicate, visitor)?;
}
Self::LISTEN { channel } => {
sqlparser::ast::VisitMut::visit(channel, visitor)?;
}
Self::UNLISTEN { channel } => {
sqlparser::ast::VisitMut::visit(channel, visitor)?;
}
Self::NOTIFY { channel, payload } => {
sqlparser::ast::VisitMut::visit(channel, visitor)?;
sqlparser::ast::VisitMut::visit(payload, visitor)?;
}
Self::LoadData {
local,
inpath,
overwrite,
table_name,
partitioned,
table_format } => {
sqlparser::ast::VisitMut::visit(local, visitor)?;
sqlparser::ast::VisitMut::visit(inpath, visitor)?;
sqlparser::ast::VisitMut::visit(overwrite, visitor)?;
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
sqlparser::ast::VisitMut::visit(partitioned, visitor)?;
sqlparser::ast::VisitMut::visit(table_format, visitor)?;
}
Self::RenameTable(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::List(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Remove(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::RaisError { message, severity, state, arguments, options }
=> {
sqlparser::ast::VisitMut::visit(message, visitor)?;
sqlparser::ast::VisitMut::visit(severity, visitor)?;
sqlparser::ast::VisitMut::visit(state, visitor)?;
sqlparser::ast::VisitMut::visit(arguments, visitor)?;
sqlparser::ast::VisitMut::visit(options, visitor)?;
}
Self::Print(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Return(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ExportData(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::CreateUser(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Vacuum(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
visitor.post_visit_statement(self)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut),
3070 visit(with = "visit_statement")
3071)]
3072pub enum Statement {
3073 Analyze {
3078 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3079 table_name: ObjectName,
3080 partitions: Option<Vec<Expr>>,
3081 for_columns: bool,
3082 columns: Vec<Ident>,
3083 cache_metadata: bool,
3084 noscan: bool,
3085 compute_statistics: bool,
3086 has_table_keyword: bool,
3087 },
3088 Set(Set),
3089 Truncate {
3094 table_names: Vec<TruncateTableTarget>,
3095 partitions: Option<Vec<Expr>>,
3096 table: bool,
3098 identity: Option<TruncateIdentityOption>,
3101 cascade: Option<CascadeOption>,
3104 on_cluster: Option<Ident>,
3109 },
3110 Msck {
3115 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3116 table_name: ObjectName,
3117 repair: bool,
3118 partition_action: Option<AddDropSync>,
3119 },
3120 Query(Box<Query>),
3124 Insert(Insert),
3128 Install {
3132 extension_name: Ident,
3134 },
3135 Load {
3139 extension_name: Ident,
3141 },
3142 Directory {
3144 overwrite: bool,
3145 local: bool,
3146 path: String,
3147 file_format: Option<FileFormat>,
3148 source: Box<Query>,
3149 },
3150 Case(CaseStatement),
3152 If(IfStatement),
3154 While(WhileStatement),
3156 Raise(RaiseStatement),
3158 Call(Function),
3162 Copy {
3166 source: CopySource,
3168 to: bool,
3170 target: CopyTarget,
3172 options: Vec<CopyOption>,
3174 legacy_options: Vec<CopyLegacyOption>,
3176 values: Vec<Option<String>>,
3178 },
3179 CopyIntoSnowflake {
3191 kind: CopyIntoSnowflakeKind,
3192 into: ObjectName,
3193 into_columns: Option<Vec<Ident>>,
3194 from_obj: Option<ObjectName>,
3195 from_obj_alias: Option<Ident>,
3196 stage_params: StageParamsObject,
3197 from_transformations: Option<Vec<StageLoadSelectItemKind>>,
3198 from_query: Option<Box<Query>>,
3199 files: Option<Vec<String>>,
3200 pattern: Option<String>,
3201 file_format: KeyValueOptions,
3202 copy_options: KeyValueOptions,
3203 validation_mode: Option<String>,
3204 partition: Option<Box<Expr>>,
3205 },
3206 Open(OpenStatement),
3211 Close {
3216 cursor: CloseCursor,
3218 },
3219 Update {
3223 table: TableWithJoins,
3225 assignments: Vec<Assignment>,
3227 from: Option<UpdateTableFromKind>,
3229 selection: Option<Expr>,
3231 returning: Option<Vec<SelectItem>>,
3233 or: Option<SqliteOnConflict>,
3235 limit: Option<Expr>,
3237 },
3238 Delete(Delete),
3242 CreateView {
3246 or_alter: bool,
3250 or_replace: bool,
3251 materialized: bool,
3252 secure: bool,
3255 name: ObjectName,
3257 name_before_not_exists: bool,
3268 columns: Vec<ViewColumnDef>,
3269 query: Box<Query>,
3270 options: CreateTableOptions,
3271 cluster_by: Vec<Ident>,
3272 comment: Option<String>,
3275 with_no_schema_binding: bool,
3277 if_not_exists: bool,
3279 temporary: bool,
3281 to: Option<ObjectName>,
3284 params: Option<CreateViewParams>,
3286 },
3287 CreateTable(CreateTable),
3291 CreateVirtualTable {
3296 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3297 name: ObjectName,
3298 if_not_exists: bool,
3299 module_name: Ident,
3300 module_args: Vec<Ident>,
3301 },
3302 CreateIndex(CreateIndex),
3306 CreateRole {
3311 names: Vec<ObjectName>,
3312 if_not_exists: bool,
3313 login: Option<bool>,
3315 inherit: Option<bool>,
3316 bypassrls: Option<bool>,
3317 password: Option<Password>,
3318 superuser: Option<bool>,
3319 create_db: Option<bool>,
3320 create_role: Option<bool>,
3321 replication: Option<bool>,
3322 connection_limit: Option<Expr>,
3323 valid_until: Option<Expr>,
3324 in_role: Vec<Ident>,
3325 in_group: Vec<Ident>,
3326 role: Vec<Ident>,
3327 user: Vec<Ident>,
3328 admin: Vec<Ident>,
3329 authorization_owner: Option<ObjectName>,
3331 },
3332 CreateSecret {
3337 or_replace: bool,
3338 temporary: Option<bool>,
3339 if_not_exists: bool,
3340 name: Option<Ident>,
3341 storage_specifier: Option<Ident>,
3342 secret_type: Ident,
3343 options: Vec<SecretOption>,
3344 },
3345 CreateServer(CreateServerStatement),
3347 CreatePolicy {
3352 name: Ident,
3353 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3354 table_name: ObjectName,
3355 policy_type: Option<CreatePolicyType>,
3356 command: Option<CreatePolicyCommand>,
3357 to: Option<Vec<Owner>>,
3358 using: Option<Expr>,
3359 with_check: Option<Expr>,
3360 },
3361 CreateConnector(CreateConnector),
3366 AlterTable {
3370 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3372 name: ObjectName,
3373 if_exists: bool,
3374 only: bool,
3375 operations: Vec<AlterTableOperation>,
3376 location: Option<HiveSetLocation>,
3377 on_cluster: Option<Ident>,
3381 iceberg: bool,
3384 end_token: AttachedToken,
3386 },
3387 AlterSchema(AlterSchema),
3392 AlterIndex {
3396 name: ObjectName,
3397 operation: AlterIndexOperation,
3398 },
3399 AlterView {
3403 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3405 name: ObjectName,
3406 columns: Vec<Ident>,
3407 query: Box<Query>,
3408 with_options: Vec<SqlOption>,
3409 },
3410 AlterType(AlterType),
3415 AlterRole {
3419 name: Ident,
3420 operation: AlterRoleOperation,
3421 },
3422 AlterPolicy {
3427 name: Ident,
3428 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
3429 table_name: ObjectName,
3430 operation: AlterPolicyOperation,
3431 },
3432 AlterConnector {
3441 name: Ident,
3442 properties: Option<Vec<SqlOption>>,
3443 url: Option<String>,
3444 owner: Option<ddl::AlterConnectorOwner>,
3445 },
3446 AlterSession {
3452 set: bool,
3454 session_params: KeyValueOptions,
3456 },
3457 AttachDatabase {
3462 schema_name: Ident,
3464 database_file_name: Expr,
3466 database: bool,
3468 },
3469 AttachDuckDBDatabase {
3475 if_not_exists: bool,
3476 database: bool,
3478 database_path: Ident,
3480 database_alias: Option<Ident>,
3481 attach_options: Vec<AttachDuckDBDatabaseOption>,
3482 },
3483 DetachDuckDBDatabase {
3489 if_exists: bool,
3490 database: bool,
3492 database_alias: Ident,
3493 },
3494 Drop {
3498 object_type: ObjectType,
3500 if_exists: bool,
3502 names: Vec<ObjectName>,
3504 cascade: bool,
3507 restrict: bool,
3510 purge: bool,
3513 temporary: bool,
3515 table: Option<ObjectName>,
3518 },
3519 DropFunction {
3523 if_exists: bool,
3524 func_desc: Vec<FunctionDesc>,
3526 drop_behavior: Option<DropBehavior>,
3528 },
3529 DropDomain(DropDomain),
3537 DropProcedure {
3541 if_exists: bool,
3542 proc_desc: Vec<FunctionDesc>,
3544 drop_behavior: Option<DropBehavior>,
3546 },
3547 DropSecret {
3551 if_exists: bool,
3552 temporary: Option<bool>,
3553 name: Ident,
3554 storage_specifier: Option<Ident>,
3555 },
3556 DropPolicy {
3561 if_exists: bool,
3562 name: Ident,
3563 table_name: ObjectName,
3564 drop_behavior: Option<DropBehavior>,
3565 },
3566 DropConnector {
3571 if_exists: bool,
3572 name: Ident,
3573 },
3574 Declare {
3582 stmts: Vec<Declare>,
3583 },
3584 CreateExtension {
3593 name: Ident,
3594 if_not_exists: bool,
3595 cascade: bool,
3596 schema: Option<Ident>,
3597 version: Option<Ident>,
3598 },
3599 DropExtension {
3606 names: Vec<Ident>,
3607 if_exists: bool,
3608 cascade_or_restrict: Option<ReferentialAction>,
3610 },
3611 Fetch {
3619 name: Ident,
3621 direction: FetchDirection,
3622 position: FetchPosition,
3623 into: Option<ObjectName>,
3625 },
3626 Flush {
3633 object_type: FlushType,
3634 location: Option<FlushLocation>,
3635 channel: Option<String>,
3636 read_lock: bool,
3637 export: bool,
3638 tables: Vec<ObjectName>,
3639 },
3640 Discard {
3647 object_type: DiscardObject,
3648 },
3649 ShowFunctions {
3653 filter: Option<ShowStatementFilter>,
3654 },
3655 ShowVariable {
3661 variable: Vec<Ident>,
3662 },
3663 ShowStatus {
3669 filter: Option<ShowStatementFilter>,
3670 global: bool,
3671 session: bool,
3672 },
3673 ShowVariables {
3679 filter: Option<ShowStatementFilter>,
3680 global: bool,
3681 session: bool,
3682 },
3683 ShowCreate {
3689 obj_type: ShowCreateObject,
3690 obj_name: ObjectName,
3691 },
3692 ShowColumns {
3696 extended: bool,
3697 full: bool,
3698 show_options: ShowStatementOptions,
3699 },
3700 ShowDatabases {
3704 terse: bool,
3705 history: bool,
3706 show_options: ShowStatementOptions,
3707 },
3708 ShowSchemas {
3712 terse: bool,
3713 history: bool,
3714 show_options: ShowStatementOptions,
3715 },
3716 ShowCharset(ShowCharset),
3722 ShowObjects(ShowObjects),
3728 ShowTables {
3732 terse: bool,
3733 history: bool,
3734 extended: bool,
3735 full: bool,
3736 external: bool,
3737 show_options: ShowStatementOptions,
3738 },
3739 ShowViews {
3743 terse: bool,
3744 materialized: bool,
3745 show_options: ShowStatementOptions,
3746 },
3747 ShowCollation {
3753 filter: Option<ShowStatementFilter>,
3754 },
3755 Use(Use),
3759 StartTransaction {
3769 modes: Vec<TransactionMode>,
3770 begin: bool,
3771 transaction: Option<BeginTransactionKind>,
3772 modifier: Option<TransactionModifier>,
3773 statements: Vec<Statement>,
3782 exception: Option<Vec<ExceptionWhen>>,
3796 has_end_keyword: bool,
3798 },
3799 Comment {
3805 object_type: CommentObject,
3806 object_name: ObjectName,
3807 comment: Option<String>,
3808 if_exists: bool,
3811 },
3812 Commit {
3822 chain: bool,
3823 end: bool,
3824 modifier: Option<TransactionModifier>,
3825 },
3826 Rollback {
3830 chain: bool,
3831 savepoint: Option<Ident>,
3832 },
3833 CreateSchema {
3837 schema_name: SchemaName,
3839 if_not_exists: bool,
3840 with: Option<Vec<SqlOption>>,
3848 options: Option<Vec<SqlOption>>,
3856 default_collate_spec: Option<Expr>,
3864 clone: Option<ObjectName>,
3872 },
3873 CreateDatabase {
3879 db_name: ObjectName,
3880 if_not_exists: bool,
3881 location: Option<String>,
3882 managed_location: Option<String>,
3883 or_replace: bool,
3884 transient: bool,
3885 clone: Option<ObjectName>,
3886 data_retention_time_in_days: Option<u64>,
3887 max_data_extension_time_in_days: Option<u64>,
3888 external_volume: Option<String>,
3889 catalog: Option<String>,
3890 replace_invalid_characters: Option<bool>,
3891 default_ddl_collation: Option<String>,
3892 storage_serialization_policy: Option<StorageSerializationPolicy>,
3893 comment: Option<String>,
3894 catalog_sync: Option<String>,
3895 catalog_sync_namespace_mode: Option<CatalogSyncNamespaceMode>,
3896 catalog_sync_namespace_flatten_delimiter: Option<String>,
3897 with_tags: Option<Vec<Tag>>,
3898 with_contacts: Option<Vec<ContactEntry>>,
3899 },
3900 CreateFunction(CreateFunction),
3910 CreateTrigger(CreateTrigger),
3912 DropTrigger(DropTrigger),
3914 CreateProcedure {
3918 or_alter: bool,
3919 name: ObjectName,
3920 params: Option<Vec<ProcedureParam>>,
3921 language: Option<Ident>,
3922 body: ConditionalStatements,
3923 },
3924 CreateMacro {
3931 or_replace: bool,
3932 temporary: bool,
3933 name: ObjectName,
3934 args: Option<Vec<MacroArg>>,
3935 definition: MacroDefinition,
3936 },
3937 CreateStage {
3942 or_replace: bool,
3943 temporary: bool,
3944 if_not_exists: bool,
3945 name: ObjectName,
3946 stage_params: StageParamsObject,
3947 directory_table_params: KeyValueOptions,
3948 file_format: KeyValueOptions,
3949 copy_options: KeyValueOptions,
3950 comment: Option<String>,
3951 },
3952 Assert {
3956 condition: Expr,
3957 message: Option<Expr>,
3958 },
3959 Grant {
3963 privileges: Privileges,
3964 objects: Option<GrantObjects>,
3965 grantees: Vec<Grantee>,
3966 with_grant_option: bool,
3967 as_grantor: Option<Ident>,
3968 granted_by: Option<Ident>,
3969 current_grants: Option<CurrentGrantsKind>,
3970 },
3971 Deny(DenyStatement),
3975 Revoke {
3979 privileges: Privileges,
3980 objects: Option<GrantObjects>,
3981 grantees: Vec<Grantee>,
3982 granted_by: Option<Ident>,
3983 cascade: Option<CascadeOption>,
3984 },
3985 Deallocate {
3991 name: Ident,
3992 prepare: bool,
3993 },
3994 Execute {
4003 name: Option<ObjectName>,
4004 parameters: Vec<Expr>,
4005 has_parentheses: bool,
4006 immediate: bool,
4008 into: Vec<Ident>,
4009 using: Vec<ExprWithAlias>,
4010 output: bool,
4013 default: bool,
4016 },
4017 Prepare {
4023 name: Ident,
4024 data_types: Vec<DataType>,
4025 statement: Box<Statement>,
4026 },
4027 Kill {
4034 modifier: Option<KillType>,
4035 id: u64,
4037 },
4038 ExplainTable {
4043 describe_alias: DescribeAlias,
4045 hive_format: Option<HiveDescribeFormat>,
4047 has_table_keyword: bool,
4052 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
4054 table_name: ObjectName,
4055 },
4056 Explain {
4060 describe_alias: DescribeAlias,
4062 analyze: bool,
4064 verbose: bool,
4066 query_plan: bool,
4071 estimate: bool,
4074 statement: Box<Statement>,
4076 format: Option<AnalyzeFormatKind>,
4078 options: Option<Vec<UtilityOption>>,
4080 },
4081 Savepoint {
4086 name: Ident,
4087 },
4088 ReleaseSavepoint {
4092 name: Ident,
4093 },
4094 Merge {
4103 into: bool,
4105 table: TableFactor,
4107 source: TableFactor,
4109 on: Box<Expr>,
4111 clauses: Vec<MergeClause>,
4113 output: Option<OutputClause>,
4115 },
4116 Cache {
4124 table_flag: Option<ObjectName>,
4126 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
4129 table_name: ObjectName,
4130 has_as: bool,
4131 options: Vec<SqlOption>,
4133 query: Option<Box<Query>>,
4135 },
4136 UNCache {
4140 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
4142 table_name: ObjectName,
4143 if_exists: bool,
4144 },
4145 CreateSequence {
4150 temporary: bool,
4151 if_not_exists: bool,
4152 name: ObjectName,
4153 data_type: Option<DataType>,
4154 sequence_options: Vec<SequenceOptions>,
4155 owned_by: Option<ObjectName>,
4156 },
4157 CreateDomain(CreateDomain),
4159 CreateType {
4163 name: ObjectName,
4164 representation: UserDefinedTypeRepresentation,
4165 },
4166 Pragma {
4170 name: ObjectName,
4171 value: Option<Value>,
4172 is_eq: bool,
4173 },
4174 LockTables {
4179 tables: Vec<LockTable>,
4180 },
4181 UnlockTables,
4186 Unload {
4198 query: Option<Box<Query>>,
4199 query_text: Option<String>,
4200 to: Ident,
4201 auth: Option<IamRoleKind>,
4202 with: Vec<SqlOption>,
4203 options: Vec<CopyLegacyOption>,
4204 },
4205 OptimizeTable {
4211 name: ObjectName,
4212 on_cluster: Option<Ident>,
4213 partition: Option<Partition>,
4214 include_final: bool,
4215 deduplicate: Option<Deduplicate>,
4216 },
4217 LISTEN {
4224 channel: Ident,
4225 },
4226 UNLISTEN {
4233 channel: Ident,
4234 },
4235 NOTIFY {
4242 channel: Ident,
4243 payload: Option<String>,
4244 },
4245 LoadData {
4254 local: bool,
4255 inpath: String,
4256 overwrite: bool,
4257 table_name: ObjectName,
4258 partitioned: Option<Vec<Expr>>,
4259 table_format: Option<HiveLoadDataFormat>,
4260 },
4261 RenameTable(Vec<RenameTable>),
4268 List(FileStagingCommand),
4271 Remove(FileStagingCommand),
4274 RaisError {
4281 message: Box<Expr>,
4282 severity: Box<Expr>,
4283 state: Box<Expr>,
4284 arguments: Vec<Expr>,
4285 options: Vec<RaisErrorOption>,
4286 },
4287 Print(PrintStatement),
4293 Return(ReturnStatement),
4299 ExportData(ExportData),
4308 CreateUser(CreateUser),
4313 Vacuum(VacuumStatement),
4320}
4321
4322#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CurrentGrantsKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CurrentGrantsKind::CopyCurrentGrants => "CopyCurrentGrants",
CurrentGrantsKind::RevokeCurrentGrants =>
"RevokeCurrentGrants",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CurrentGrantsKind {
#[inline]
fn clone(&self) -> CurrentGrantsKind {
match self {
CurrentGrantsKind::CopyCurrentGrants =>
CurrentGrantsKind::CopyCurrentGrants,
CurrentGrantsKind::RevokeCurrentGrants =>
CurrentGrantsKind::RevokeCurrentGrants,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CurrentGrantsKind {
#[inline]
fn eq(&self, other: &CurrentGrantsKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CurrentGrantsKind {
#[inline]
fn partial_cmp(&self, other: &CurrentGrantsKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CurrentGrantsKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CurrentGrantsKind {
#[inline]
fn cmp(&self, other: &CurrentGrantsKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CurrentGrantsKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
4328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4329#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CurrentGrantsKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::CopyCurrentGrants => {}
Self::RevokeCurrentGrants => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CurrentGrantsKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::CopyCurrentGrants => {}
Self::RevokeCurrentGrants => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
4330pub enum CurrentGrantsKind {
4331 CopyCurrentGrants,
4332 RevokeCurrentGrants,
4333}
4334
4335impl fmt::Display for CurrentGrantsKind {
4336 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4337 match self {
4338 CurrentGrantsKind::CopyCurrentGrants => f.write_fmt(format_args!("COPY CURRENT GRANTS"))write!(f, "COPY CURRENT GRANTS"),
4339 CurrentGrantsKind::RevokeCurrentGrants => f.write_fmt(format_args!("REVOKE CURRENT GRANTS"))write!(f, "REVOKE CURRENT GRANTS"),
4340 }
4341 }
4342}
4343
4344#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RaisErrorOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
RaisErrorOption::Log => "Log",
RaisErrorOption::NoWait => "NoWait",
RaisErrorOption::SetError => "SetError",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RaisErrorOption {
#[inline]
fn clone(&self) -> RaisErrorOption {
match self {
RaisErrorOption::Log => RaisErrorOption::Log,
RaisErrorOption::NoWait => RaisErrorOption::NoWait,
RaisErrorOption::SetError => RaisErrorOption::SetError,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RaisErrorOption {
#[inline]
fn eq(&self, other: &RaisErrorOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RaisErrorOption {
#[inline]
fn partial_cmp(&self, other: &RaisErrorOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RaisErrorOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RaisErrorOption {
#[inline]
fn cmp(&self, other: &RaisErrorOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RaisErrorOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
4345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4346#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RaisErrorOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Log => {} Self::NoWait => {} Self::SetError => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for RaisErrorOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Log => {} Self::NoWait => {} Self::SetError => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
4347pub enum RaisErrorOption {
4348 Log,
4349 NoWait,
4350 SetError,
4351}
4352
4353impl fmt::Display for RaisErrorOption {
4354 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4355 match self {
4356 RaisErrorOption::Log => f.write_fmt(format_args!("LOG"))write!(f, "LOG"),
4357 RaisErrorOption::NoWait => f.write_fmt(format_args!("NOWAIT"))write!(f, "NOWAIT"),
4358 RaisErrorOption::SetError => f.write_fmt(format_args!("SETERROR"))write!(f, "SETERROR"),
4359 }
4360 }
4361}
4362
4363impl fmt::Display for Statement {
4364 #[allow(clippy::cognitive_complexity)]
4389 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4390 match self {
4391 Statement::Flush {
4392 object_type,
4393 location,
4394 channel,
4395 read_lock,
4396 export,
4397 tables,
4398 } => {
4399 f.write_fmt(format_args!("FLUSH"))write!(f, "FLUSH")?;
4400 if let Some(location) = location {
4401 f.write_str(" ")?;
4402 location.fmt(f)?;
4403 }
4404 f.write_fmt(format_args!(" {0}", object_type))write!(f, " {object_type}")?;
4405
4406 if let Some(channel) = channel {
4407 f.write_fmt(format_args!(" FOR CHANNEL {0}", channel))write!(f, " FOR CHANNEL {channel}")?;
4408 }
4409
4410 f.write_fmt(format_args!("{0}{2}{1}",
if !tables.is_empty() {
" ".to_string() + &display_comma_separated(tables).to_string()
} else { "".to_string() }, if *export { " FOR EXPORT" } else { "" },
if *read_lock { " WITH READ LOCK" } else { "" }))write!(
4411 f,
4412 "{tables}{read}{export}",
4413 tables = if !tables.is_empty() {
4414 " ".to_string() + &display_comma_separated(tables).to_string()
4415 } else {
4416 "".to_string()
4417 },
4418 export = if *export { " FOR EXPORT" } else { "" },
4419 read = if *read_lock { " WITH READ LOCK" } else { "" }
4420 )
4421 }
4422 Statement::Kill { modifier, id } => {
4423 f.write_fmt(format_args!("KILL "))write!(f, "KILL ")?;
4424
4425 if let Some(m) = modifier {
4426 f.write_fmt(format_args!("{0} ", m))write!(f, "{m} ")?;
4427 }
4428
4429 f.write_fmt(format_args!("{0}", id))write!(f, "{id}")
4430 }
4431 Statement::ExplainTable {
4432 describe_alias,
4433 hive_format,
4434 has_table_keyword,
4435 table_name,
4436 } => {
4437 f.write_fmt(format_args!("{0} ", describe_alias))write!(f, "{describe_alias} ")?;
4438
4439 if let Some(format) = hive_format {
4440 f.write_fmt(format_args!("{0} ", format))write!(f, "{format} ")?;
4441 }
4442 if *has_table_keyword {
4443 f.write_fmt(format_args!("TABLE "))write!(f, "TABLE ")?;
4444 }
4445
4446 f.write_fmt(format_args!("{0}", table_name))write!(f, "{table_name}")
4447 }
4448 Statement::Explain {
4449 describe_alias,
4450 verbose,
4451 analyze,
4452 query_plan,
4453 estimate,
4454 statement,
4455 format,
4456 options,
4457 } => {
4458 f.write_fmt(format_args!("{0} ", describe_alias))write!(f, "{describe_alias} ")?;
4459
4460 if *query_plan {
4461 f.write_fmt(format_args!("QUERY PLAN "))write!(f, "QUERY PLAN ")?;
4462 }
4463 if *analyze {
4464 f.write_fmt(format_args!("ANALYZE "))write!(f, "ANALYZE ")?;
4465 }
4466 if *estimate {
4467 f.write_fmt(format_args!("ESTIMATE "))write!(f, "ESTIMATE ")?;
4468 }
4469
4470 if *verbose {
4471 f.write_fmt(format_args!("VERBOSE "))write!(f, "VERBOSE ")?;
4472 }
4473
4474 if let Some(format) = format {
4475 f.write_fmt(format_args!("{0} ", format))write!(f, "{format} ")?;
4476 }
4477
4478 if let Some(options) = options {
4479 f.write_fmt(format_args!("({0}) ", display_comma_separated(options)))write!(f, "({}) ", display_comma_separated(options))?;
4480 }
4481
4482 f.write_fmt(format_args!("{0}", statement))write!(f, "{statement}")
4483 }
4484 Statement::Query(s) => s.fmt(f),
4485 Statement::Declare { stmts } => {
4486 f.write_fmt(format_args!("DECLARE "))write!(f, "DECLARE ")?;
4487 f.write_fmt(format_args!("{0}", display_separated(stmts, "; ")))write!(f, "{}", display_separated(stmts, "; "))
4488 }
4489 Statement::Fetch {
4490 name,
4491 direction,
4492 position,
4493 into,
4494 } => {
4495 f.write_fmt(format_args!("FETCH {0} {1} {2}", direction, position, name))write!(f, "FETCH {direction} {position} {name}")?;
4496
4497 if let Some(into) = into {
4498 f.write_fmt(format_args!(" INTO {0}", into))write!(f, " INTO {into}")?;
4499 }
4500
4501 Ok(())
4502 }
4503 Statement::Directory {
4504 overwrite,
4505 local,
4506 path,
4507 file_format,
4508 source,
4509 } => {
4510 f.write_fmt(format_args!("INSERT{0}{1} DIRECTORY \'{2}\'",
if *overwrite { " OVERWRITE" } else { "" },
if *local { " LOCAL" } else { "" }, path))write!(
4511 f,
4512 "INSERT{overwrite}{local} DIRECTORY '{path}'",
4513 overwrite = if *overwrite { " OVERWRITE" } else { "" },
4514 local = if *local { " LOCAL" } else { "" },
4515 path = path
4516 )?;
4517 if let Some(ref ff) = file_format {
4518 f.write_fmt(format_args!(" STORED AS {0}", ff))write!(f, " STORED AS {ff}")?
4519 }
4520 f.write_fmt(format_args!(" {0}", source))write!(f, " {source}")
4521 }
4522 Statement::Msck {
4523 table_name,
4524 repair,
4525 partition_action,
4526 } => {
4527 f.write_fmt(format_args!("MSCK {0}TABLE {1}",
if *repair { "REPAIR " } else { "" }, table_name))write!(
4528 f,
4529 "MSCK {repair}TABLE {table}",
4530 repair = if *repair { "REPAIR " } else { "" },
4531 table = table_name
4532 )?;
4533 if let Some(pa) = partition_action {
4534 f.write_fmt(format_args!(" {0}", pa))write!(f, " {pa}")?;
4535 }
4536 Ok(())
4537 }
4538 Statement::Truncate {
4539 table_names,
4540 partitions,
4541 table,
4542 identity,
4543 cascade,
4544 on_cluster,
4545 } => {
4546 let table = if *table { "TABLE " } else { "" };
4547
4548 f.write_fmt(format_args!("TRUNCATE {1}{0}",
display_comma_separated(table_names), table))write!(
4549 f,
4550 "TRUNCATE {table}{table_names}",
4551 table_names = display_comma_separated(table_names)
4552 )?;
4553
4554 if let Some(identity) = identity {
4555 match identity {
4556 TruncateIdentityOption::Restart => f.write_fmt(format_args!(" RESTART IDENTITY"))write!(f, " RESTART IDENTITY")?,
4557 TruncateIdentityOption::Continue => f.write_fmt(format_args!(" CONTINUE IDENTITY"))write!(f, " CONTINUE IDENTITY")?,
4558 }
4559 }
4560 if let Some(cascade) = cascade {
4561 match cascade {
4562 CascadeOption::Cascade => f.write_fmt(format_args!(" CASCADE"))write!(f, " CASCADE")?,
4563 CascadeOption::Restrict => f.write_fmt(format_args!(" RESTRICT"))write!(f, " RESTRICT")?,
4564 }
4565 }
4566
4567 if let Some(ref parts) = partitions {
4568 if !parts.is_empty() {
4569 f.write_fmt(format_args!(" PARTITION ({0})", display_comma_separated(parts)))write!(f, " PARTITION ({})", display_comma_separated(parts))?;
4570 }
4571 }
4572 if let Some(on_cluster) = on_cluster {
4573 f.write_fmt(format_args!(" ON CLUSTER {0}", on_cluster))write!(f, " ON CLUSTER {on_cluster}")?;
4574 }
4575 Ok(())
4576 }
4577 Statement::Case(stmt) => {
4578 f.write_fmt(format_args!("{0}", stmt))write!(f, "{stmt}")
4579 }
4580 Statement::If(stmt) => {
4581 f.write_fmt(format_args!("{0}", stmt))write!(f, "{stmt}")
4582 }
4583 Statement::While(stmt) => {
4584 f.write_fmt(format_args!("{0}", stmt))write!(f, "{stmt}")
4585 }
4586 Statement::Raise(stmt) => {
4587 f.write_fmt(format_args!("{0}", stmt))write!(f, "{stmt}")
4588 }
4589 Statement::AttachDatabase {
4590 schema_name,
4591 database_file_name,
4592 database,
4593 } => {
4594 let keyword = if *database { "DATABASE " } else { "" };
4595 f.write_fmt(format_args!("ATTACH {0}{1} AS {2}", keyword, database_file_name,
schema_name))write!(f, "ATTACH {keyword}{database_file_name} AS {schema_name}")
4596 }
4597 Statement::AttachDuckDBDatabase {
4598 if_not_exists,
4599 database,
4600 database_path,
4601 database_alias,
4602 attach_options,
4603 } => {
4604 f.write_fmt(format_args!("ATTACH{0}{1} {2}",
if *database { " DATABASE" } else { "" },
if *if_not_exists { " IF NOT EXISTS" } else { "" }, database_path))write!(
4605 f,
4606 "ATTACH{database}{if_not_exists} {database_path}",
4607 database = if *database { " DATABASE" } else { "" },
4608 if_not_exists = if *if_not_exists { " IF NOT EXISTS" } else { "" },
4609 )?;
4610 if let Some(alias) = database_alias {
4611 f.write_fmt(format_args!(" AS {0}", alias))write!(f, " AS {alias}")?;
4612 }
4613 if !attach_options.is_empty() {
4614 f.write_fmt(format_args!(" ({0})", display_comma_separated(attach_options)))write!(f, " ({})", display_comma_separated(attach_options))?;
4615 }
4616 Ok(())
4617 }
4618 Statement::DetachDuckDBDatabase {
4619 if_exists,
4620 database,
4621 database_alias,
4622 } => {
4623 f.write_fmt(format_args!("DETACH{0}{1} {2}",
if *database { " DATABASE" } else { "" },
if *if_exists { " IF EXISTS" } else { "" }, database_alias))write!(
4624 f,
4625 "DETACH{database}{if_exists} {database_alias}",
4626 database = if *database { " DATABASE" } else { "" },
4627 if_exists = if *if_exists { " IF EXISTS" } else { "" },
4628 )?;
4629 Ok(())
4630 }
4631 Statement::Analyze {
4632 table_name,
4633 partitions,
4634 for_columns,
4635 columns,
4636 cache_metadata,
4637 noscan,
4638 compute_statistics,
4639 has_table_keyword,
4640 } => {
4641 f.write_fmt(format_args!("ANALYZE{0}{1}",
if *has_table_keyword { " TABLE " } else { " " }, table_name))write!(
4642 f,
4643 "ANALYZE{}{table_name}",
4644 if *has_table_keyword { " TABLE " } else { " " }
4645 )?;
4646 if let Some(ref parts) = partitions {
4647 if !parts.is_empty() {
4648 f.write_fmt(format_args!(" PARTITION ({0})", display_comma_separated(parts)))write!(f, " PARTITION ({})", display_comma_separated(parts))?;
4649 }
4650 }
4651
4652 if *compute_statistics {
4653 f.write_fmt(format_args!(" COMPUTE STATISTICS"))write!(f, " COMPUTE STATISTICS")?;
4654 }
4655 if *noscan {
4656 f.write_fmt(format_args!(" NOSCAN"))write!(f, " NOSCAN")?;
4657 }
4658 if *cache_metadata {
4659 f.write_fmt(format_args!(" CACHE METADATA"))write!(f, " CACHE METADATA")?;
4660 }
4661 if *for_columns {
4662 f.write_fmt(format_args!(" FOR COLUMNS"))write!(f, " FOR COLUMNS")?;
4663 if !columns.is_empty() {
4664 f.write_fmt(format_args!(" {0}", display_comma_separated(columns)))write!(f, " {}", display_comma_separated(columns))?;
4665 }
4666 }
4667 Ok(())
4668 }
4669 Statement::Insert(insert) => insert.fmt(f),
4670 Statement::Install {
4671 extension_name: name,
4672 } => f.write_fmt(format_args!("INSTALL {0}", name))write!(f, "INSTALL {name}"),
4673
4674 Statement::Load {
4675 extension_name: name,
4676 } => f.write_fmt(format_args!("LOAD {0}", name))write!(f, "LOAD {name}"),
4677
4678 Statement::Call(function) => f.write_fmt(format_args!("CALL {0}", function))write!(f, "CALL {function}"),
4679
4680 Statement::Copy {
4681 source,
4682 to,
4683 target,
4684 options,
4685 legacy_options,
4686 values,
4687 } => {
4688 f.write_fmt(format_args!("COPY"))write!(f, "COPY")?;
4689 match source {
4690 CopySource::Query(query) => f.write_fmt(format_args!(" ({0})", query))write!(f, " ({query})")?,
4691 CopySource::Table {
4692 table_name,
4693 columns,
4694 } => {
4695 f.write_fmt(format_args!(" {0}", table_name))write!(f, " {table_name}")?;
4696 if !columns.is_empty() {
4697 f.write_fmt(format_args!(" ({0})", display_comma_separated(columns)))write!(f, " ({})", display_comma_separated(columns))?;
4698 }
4699 }
4700 }
4701 f.write_fmt(format_args!(" {0} {1}", if *to { "TO" } else { "FROM" }, target))write!(f, " {} {}", if *to { "TO" } else { "FROM" }, target)?;
4702 if !options.is_empty() {
4703 f.write_fmt(format_args!(" ({0})", display_comma_separated(options)))write!(f, " ({})", display_comma_separated(options))?;
4704 }
4705 if !legacy_options.is_empty() {
4706 f.write_fmt(format_args!(" {0}", display_separated(legacy_options, " ")))write!(f, " {}", display_separated(legacy_options, " "))?;
4707 }
4708 if !values.is_empty() {
4709 f.write_fmt(format_args!(";\n"))writeln!(f, ";")?;
4710 let mut delim = "";
4711 for v in values {
4712 f.write_fmt(format_args!("{0}", delim))write!(f, "{delim}")?;
4713 delim = "\t";
4714 if let Some(v) = v {
4715 f.write_fmt(format_args!("{0}", v))write!(f, "{v}")?;
4716 } else {
4717 f.write_fmt(format_args!("\\N"))write!(f, "\\N")?;
4718 }
4719 }
4720 f.write_fmt(format_args!("\n\\."))write!(f, "\n\\.")?;
4721 }
4722 Ok(())
4723 }
4724 Statement::Update {
4725 table,
4726 assignments,
4727 from,
4728 selection,
4729 returning,
4730 or,
4731 limit,
4732 } => {
4733 f.write_str("UPDATE ")?;
4734 if let Some(or) = or {
4735 or.fmt(f)?;
4736 f.write_str(" ")?;
4737 }
4738 table.fmt(f)?;
4739 if let Some(UpdateTableFromKind::BeforeSet(from)) = from {
4740 SpaceOrNewline.fmt(f)?;
4741 f.write_str("FROM")?;
4742 indented_list(f, from)?;
4743 }
4744 if !assignments.is_empty() {
4745 SpaceOrNewline.fmt(f)?;
4746 f.write_str("SET")?;
4747 indented_list(f, assignments)?;
4748 }
4749 if let Some(UpdateTableFromKind::AfterSet(from)) = from {
4750 SpaceOrNewline.fmt(f)?;
4751 f.write_str("FROM")?;
4752 indented_list(f, from)?;
4753 }
4754 if let Some(selection) = selection {
4755 SpaceOrNewline.fmt(f)?;
4756 f.write_str("WHERE")?;
4757 SpaceOrNewline.fmt(f)?;
4758 Indent(selection).fmt(f)?;
4759 }
4760 if let Some(returning) = returning {
4761 SpaceOrNewline.fmt(f)?;
4762 f.write_str("RETURNING")?;
4763 indented_list(f, returning)?;
4764 }
4765 if let Some(limit) = limit {
4766 SpaceOrNewline.fmt(f)?;
4767 f.write_fmt(format_args!("LIMIT {0}", limit))write!(f, "LIMIT {limit}")?;
4768 }
4769 Ok(())
4770 }
4771 Statement::Delete(delete) => delete.fmt(f),
4772 Statement::Open(open) => open.fmt(f),
4773 Statement::Close { cursor } => {
4774 f.write_fmt(format_args!("CLOSE {0}", cursor))write!(f, "CLOSE {cursor}")?;
4775
4776 Ok(())
4777 }
4778 Statement::CreateDatabase {
4779 db_name,
4780 if_not_exists,
4781 location,
4782 managed_location,
4783 or_replace,
4784 transient,
4785 clone,
4786 data_retention_time_in_days,
4787 max_data_extension_time_in_days,
4788 external_volume,
4789 catalog,
4790 replace_invalid_characters,
4791 default_ddl_collation,
4792 storage_serialization_policy,
4793 comment,
4794 catalog_sync,
4795 catalog_sync_namespace_mode,
4796 catalog_sync_namespace_flatten_delimiter,
4797 with_tags,
4798 with_contacts,
4799 } => {
4800 f.write_fmt(format_args!("CREATE {0}{1}DATABASE {2}{3}",
if *or_replace { "OR REPLACE " } else { "" },
if *transient { "TRANSIENT " } else { "" },
if *if_not_exists { "IF NOT EXISTS " } else { "" }, db_name))write!(
4801 f,
4802 "CREATE {or_replace}{transient}DATABASE {if_not_exists}{name}",
4803 or_replace = if *or_replace { "OR REPLACE " } else { "" },
4804 transient = if *transient { "TRANSIENT " } else { "" },
4805 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
4806 name = db_name,
4807 )?;
4808
4809 if let Some(l) = location {
4810 f.write_fmt(format_args!(" LOCATION \'{0}\'", l))write!(f, " LOCATION '{l}'")?;
4811 }
4812 if let Some(ml) = managed_location {
4813 f.write_fmt(format_args!(" MANAGEDLOCATION \'{0}\'", ml))write!(f, " MANAGEDLOCATION '{ml}'")?;
4814 }
4815 if let Some(clone) = clone {
4816 f.write_fmt(format_args!(" CLONE {0}", clone))write!(f, " CLONE {clone}")?;
4817 }
4818
4819 if let Some(value) = data_retention_time_in_days {
4820 f.write_fmt(format_args!(" DATA_RETENTION_TIME_IN_DAYS = {0}", value))write!(f, " DATA_RETENTION_TIME_IN_DAYS = {value}")?;
4821 }
4822
4823 if let Some(value) = max_data_extension_time_in_days {
4824 f.write_fmt(format_args!(" MAX_DATA_EXTENSION_TIME_IN_DAYS = {0}", value))write!(f, " MAX_DATA_EXTENSION_TIME_IN_DAYS = {value}")?;
4825 }
4826
4827 if let Some(vol) = external_volume {
4828 f.write_fmt(format_args!(" EXTERNAL_VOLUME = \'{0}\'", vol))write!(f, " EXTERNAL_VOLUME = '{vol}'")?;
4829 }
4830
4831 if let Some(cat) = catalog {
4832 f.write_fmt(format_args!(" CATALOG = \'{0}\'", cat))write!(f, " CATALOG = '{cat}'")?;
4833 }
4834
4835 if let Some(true) = replace_invalid_characters {
4836 f.write_fmt(format_args!(" REPLACE_INVALID_CHARACTERS = TRUE"))write!(f, " REPLACE_INVALID_CHARACTERS = TRUE")?;
4837 } else if let Some(false) = replace_invalid_characters {
4838 f.write_fmt(format_args!(" REPLACE_INVALID_CHARACTERS = FALSE"))write!(f, " REPLACE_INVALID_CHARACTERS = FALSE")?;
4839 }
4840
4841 if let Some(collation) = default_ddl_collation {
4842 f.write_fmt(format_args!(" DEFAULT_DDL_COLLATION = \'{0}\'", collation))write!(f, " DEFAULT_DDL_COLLATION = '{collation}'")?;
4843 }
4844
4845 if let Some(policy) = storage_serialization_policy {
4846 f.write_fmt(format_args!(" STORAGE_SERIALIZATION_POLICY = {0}", policy))write!(f, " STORAGE_SERIALIZATION_POLICY = {policy}")?;
4847 }
4848
4849 if let Some(comment) = comment {
4850 f.write_fmt(format_args!(" COMMENT = \'{0}\'", comment))write!(f, " COMMENT = '{comment}'")?;
4851 }
4852
4853 if let Some(sync) = catalog_sync {
4854 f.write_fmt(format_args!(" CATALOG_SYNC = \'{0}\'", sync))write!(f, " CATALOG_SYNC = '{sync}'")?;
4855 }
4856
4857 if let Some(mode) = catalog_sync_namespace_mode {
4858 f.write_fmt(format_args!(" CATALOG_SYNC_NAMESPACE_MODE = {0}", mode))write!(f, " CATALOG_SYNC_NAMESPACE_MODE = {mode}")?;
4859 }
4860
4861 if let Some(delim) = catalog_sync_namespace_flatten_delimiter {
4862 f.write_fmt(format_args!(" CATALOG_SYNC_NAMESPACE_FLATTEN_DELIMITER = \'{0}\'",
delim))write!(f, " CATALOG_SYNC_NAMESPACE_FLATTEN_DELIMITER = '{delim}'")?;
4863 }
4864
4865 if let Some(tags) = with_tags {
4866 f.write_fmt(format_args!(" WITH TAG ({0})", display_comma_separated(tags)))write!(f, " WITH TAG ({})", display_comma_separated(tags))?;
4867 }
4868
4869 if let Some(contacts) = with_contacts {
4870 f.write_fmt(format_args!(" WITH CONTACT ({0})",
display_comma_separated(contacts)))write!(f, " WITH CONTACT ({})", display_comma_separated(contacts))?;
4871 }
4872 Ok(())
4873 }
4874 Statement::CreateFunction(create_function) => create_function.fmt(f),
4875 Statement::CreateDomain(create_domain) => create_domain.fmt(f),
4876 Statement::CreateTrigger(create_trigger) => create_trigger.fmt(f),
4877 Statement::DropTrigger(drop_trigger) => drop_trigger.fmt(f),
4878 Statement::CreateProcedure {
4879 name,
4880 or_alter,
4881 params,
4882 language,
4883 body,
4884 } => {
4885 f.write_fmt(format_args!("CREATE {0}PROCEDURE {1}",
if *or_alter { "OR ALTER " } else { "" }, name))write!(
4886 f,
4887 "CREATE {or_alter}PROCEDURE {name}",
4888 or_alter = if *or_alter { "OR ALTER " } else { "" },
4889 name = name
4890 )?;
4891
4892 if let Some(p) = params {
4893 if !p.is_empty() {
4894 f.write_fmt(format_args!(" ({0})", display_comma_separated(p)))write!(f, " ({})", display_comma_separated(p))?;
4895 }
4896 }
4897
4898 if let Some(language) = language {
4899 f.write_fmt(format_args!(" LANGUAGE {0}", language))write!(f, " LANGUAGE {language}")?;
4900 }
4901
4902 f.write_fmt(format_args!(" AS {0}", body))write!(f, " AS {body}")
4903 }
4904 Statement::CreateMacro {
4905 or_replace,
4906 temporary,
4907 name,
4908 args,
4909 definition,
4910 } => {
4911 f.write_fmt(format_args!("CREATE {1}{0}MACRO {2}",
if *temporary { "TEMPORARY " } else { "" },
if *or_replace { "OR REPLACE " } else { "" }, name))write!(
4912 f,
4913 "CREATE {or_replace}{temp}MACRO {name}",
4914 temp = if *temporary { "TEMPORARY " } else { "" },
4915 or_replace = if *or_replace { "OR REPLACE " } else { "" },
4916 )?;
4917 if let Some(args) = args {
4918 f.write_fmt(format_args!("({0})", display_comma_separated(args)))write!(f, "({})", display_comma_separated(args))?;
4919 }
4920 match definition {
4921 MacroDefinition::Expr(expr) => f.write_fmt(format_args!(" AS {0}", expr))write!(f, " AS {expr}")?,
4922 MacroDefinition::Table(query) => f.write_fmt(format_args!(" AS TABLE {0}", query))write!(f, " AS TABLE {query}")?,
4923 }
4924 Ok(())
4925 }
4926 Statement::CreateView {
4927 or_alter,
4928 name,
4929 or_replace,
4930 columns,
4931 query,
4932 materialized,
4933 secure,
4934 options,
4935 cluster_by,
4936 comment,
4937 with_no_schema_binding,
4938 if_not_exists,
4939 temporary,
4940 to,
4941 params,
4942 name_before_not_exists,
4943 } => {
4944 f.write_fmt(format_args!("CREATE {0}{1}",
if *or_alter { "OR ALTER " } else { "" },
if *or_replace { "OR REPLACE " } else { "" }))write!(
4945 f,
4946 "CREATE {or_alter}{or_replace}",
4947 or_alter = if *or_alter { "OR ALTER " } else { "" },
4948 or_replace = if *or_replace { "OR REPLACE " } else { "" },
4949 )?;
4950 if let Some(params) = params {
4951 params.fmt(f)?;
4952 }
4953 f.write_fmt(format_args!("{1}{2}{3}VIEW {0}{4}",
if *if_not_exists {
if *name_before_not_exists {
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0} IF NOT EXISTS",
name))
})
} else {
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("IF NOT EXISTS {0}",
name))
})
}
} else {
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", name))
})
}, if *secure { "SECURE " } else { "" },
if *materialized { "MATERIALIZED " } else { "" },
if *temporary { "TEMPORARY " } else { "" },
to.as_ref().map(|to|
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" TO {0}", to))
})).unwrap_or_default()))write!(
4954 f,
4955 "{secure}{materialized}{temporary}VIEW {if_not_and_name}{to}",
4956 if_not_and_name = if *if_not_exists {
4957 if *name_before_not_exists {
4958 format!("{name} IF NOT EXISTS")
4959 } else {
4960 format!("IF NOT EXISTS {name}")
4961 }
4962 } else {
4963 format!("{name}")
4964 },
4965 secure = if *secure { "SECURE " } else { "" },
4966 materialized = if *materialized { "MATERIALIZED " } else { "" },
4967 temporary = if *temporary { "TEMPORARY " } else { "" },
4968 to = to
4969 .as_ref()
4970 .map(|to| format!(" TO {to}"))
4971 .unwrap_or_default()
4972 )?;
4973 if !columns.is_empty() {
4974 f.write_fmt(format_args!(" ({0})", display_comma_separated(columns)))write!(f, " ({})", display_comma_separated(columns))?;
4975 }
4976 if #[allow(non_exhaustive_omitted_patterns)] match options {
CreateTableOptions::With(_) => true,
_ => false,
}matches!(options, CreateTableOptions::With(_)) {
4977 f.write_fmt(format_args!(" {0}", options))write!(f, " {options}")?;
4978 }
4979 if let Some(comment) = comment {
4980 f.write_fmt(format_args!(" COMMENT = \'{0}\'",
value::escape_single_quote_string(comment)))write!(
4981 f,
4982 " COMMENT = '{}'",
4983 value::escape_single_quote_string(comment)
4984 )?;
4985 }
4986 if !cluster_by.is_empty() {
4987 f.write_fmt(format_args!(" CLUSTER BY ({0})",
display_comma_separated(cluster_by)))write!(f, " CLUSTER BY ({})", display_comma_separated(cluster_by))?;
4988 }
4989 if #[allow(non_exhaustive_omitted_patterns)] match options {
CreateTableOptions::Options(_) => true,
_ => false,
}matches!(options, CreateTableOptions::Options(_)) {
4990 f.write_fmt(format_args!(" {0}", options))write!(f, " {options}")?;
4991 }
4992 f.write_str(" AS")?;
4993 SpaceOrNewline.fmt(f)?;
4994 query.fmt(f)?;
4995 if *with_no_schema_binding {
4996 f.write_fmt(format_args!(" WITH NO SCHEMA BINDING"))write!(f, " WITH NO SCHEMA BINDING")?;
4997 }
4998 Ok(())
4999 }
5000 Statement::CreateTable(create_table) => create_table.fmt(f),
5001 Statement::LoadData {
5002 local,
5003 inpath,
5004 overwrite,
5005 table_name,
5006 partitioned,
5007 table_format,
5008 } => {
5009 f.write_fmt(format_args!("LOAD DATA {0}INPATH \'{1}\' {2}INTO TABLE {3}",
if *local { "LOCAL " } else { "" }, inpath,
if *overwrite { "OVERWRITE " } else { "" }, table_name))write!(
5010 f,
5011 "LOAD DATA {local}INPATH '{inpath}' {overwrite}INTO TABLE {table_name}",
5012 local = if *local { "LOCAL " } else { "" },
5013 inpath = inpath,
5014 overwrite = if *overwrite { "OVERWRITE " } else { "" },
5015 table_name = table_name,
5016 )?;
5017 if let Some(ref parts) = &partitioned {
5018 if !parts.is_empty() {
5019 f.write_fmt(format_args!(" PARTITION ({0})", display_comma_separated(parts)))write!(f, " PARTITION ({})", display_comma_separated(parts))?;
5020 }
5021 }
5022 if let Some(HiveLoadDataFormat {
5023 serde,
5024 input_format,
5025 }) = &table_format
5026 {
5027 f.write_fmt(format_args!(" INPUTFORMAT {0} SERDE {1}", input_format, serde))write!(f, " INPUTFORMAT {input_format} SERDE {serde}")?;
5028 }
5029 Ok(())
5030 }
5031 Statement::CreateVirtualTable {
5032 name,
5033 if_not_exists,
5034 module_name,
5035 module_args,
5036 } => {
5037 f.write_fmt(format_args!("CREATE VIRTUAL TABLE {0}{1} USING {2}",
if *if_not_exists { "IF NOT EXISTS " } else { "" }, name,
module_name))write!(
5038 f,
5039 "CREATE VIRTUAL TABLE {if_not_exists}{name} USING {module_name}",
5040 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
5041 name = name,
5042 module_name = module_name
5043 )?;
5044 if !module_args.is_empty() {
5045 f.write_fmt(format_args!(" ({0})", display_comma_separated(module_args)))write!(f, " ({})", display_comma_separated(module_args))?;
5046 }
5047 Ok(())
5048 }
5049 Statement::CreateIndex(create_index) => create_index.fmt(f),
5050 Statement::CreateExtension {
5051 name,
5052 if_not_exists,
5053 cascade,
5054 schema,
5055 version,
5056 } => {
5057 f.write_fmt(format_args!("CREATE EXTENSION {0}{1}",
if *if_not_exists { "IF NOT EXISTS " } else { "" }, name))write!(
5058 f,
5059 "CREATE EXTENSION {if_not_exists}{name}",
5060 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" }
5061 )?;
5062 if *cascade || schema.is_some() || version.is_some() {
5063 f.write_fmt(format_args!(" WITH"))write!(f, " WITH")?;
5064
5065 if let Some(name) = schema {
5066 f.write_fmt(format_args!(" SCHEMA {0}", name))write!(f, " SCHEMA {name}")?;
5067 }
5068 if let Some(version) = version {
5069 f.write_fmt(format_args!(" VERSION {0}", version))write!(f, " VERSION {version}")?;
5070 }
5071 if *cascade {
5072 f.write_fmt(format_args!(" CASCADE"))write!(f, " CASCADE")?;
5073 }
5074 }
5075
5076 Ok(())
5077 }
5078 Statement::DropExtension {
5079 names,
5080 if_exists,
5081 cascade_or_restrict,
5082 } => {
5083 f.write_fmt(format_args!("DROP EXTENSION"))write!(f, "DROP EXTENSION")?;
5084 if *if_exists {
5085 f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
5086 }
5087 f.write_fmt(format_args!(" {0}", display_comma_separated(names)))write!(f, " {}", display_comma_separated(names))?;
5088 if let Some(cascade_or_restrict) = cascade_or_restrict {
5089 f.write_fmt(format_args!(" {0}", cascade_or_restrict))write!(f, " {cascade_or_restrict}")?;
5090 }
5091 Ok(())
5092 }
5093 Statement::CreateRole {
5094 names,
5095 if_not_exists,
5096 inherit,
5097 login,
5098 bypassrls,
5099 password,
5100 create_db,
5101 create_role,
5102 superuser,
5103 replication,
5104 connection_limit,
5105 valid_until,
5106 in_role,
5107 in_group,
5108 role,
5109 user,
5110 admin,
5111 authorization_owner,
5112 } => {
5113 f.write_fmt(format_args!("CREATE ROLE {0}{1}{2}{3}{4}{5}{6}{7}{8}",
if *if_not_exists { "IF NOT EXISTS " } else { "" },
display_separated(names, ", "),
match *superuser {
Some(true) => " SUPERUSER",
Some(false) => " NOSUPERUSER",
None => "",
},
match *create_db {
Some(true) => " CREATEDB",
Some(false) => " NOCREATEDB",
None => "",
},
match *create_role {
Some(true) => " CREATEROLE",
Some(false) => " NOCREATEROLE",
None => "",
},
match *inherit {
Some(true) => " INHERIT",
Some(false) => " NOINHERIT",
None => "",
},
match *login {
Some(true) => " LOGIN",
Some(false) => " NOLOGIN",
None => "",
},
match *replication {
Some(true) => " REPLICATION",
Some(false) => " NOREPLICATION",
None => "",
},
match *bypassrls {
Some(true) => " BYPASSRLS",
Some(false) => " NOBYPASSRLS",
None => "",
}))write!(
5114 f,
5115 "CREATE ROLE {if_not_exists}{names}{superuser}{create_db}{create_role}{inherit}{login}{replication}{bypassrls}",
5116 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
5117 names = display_separated(names, ", "),
5118 superuser = match *superuser {
5119 Some(true) => " SUPERUSER",
5120 Some(false) => " NOSUPERUSER",
5121 None => ""
5122 },
5123 create_db = match *create_db {
5124 Some(true) => " CREATEDB",
5125 Some(false) => " NOCREATEDB",
5126 None => ""
5127 },
5128 create_role = match *create_role {
5129 Some(true) => " CREATEROLE",
5130 Some(false) => " NOCREATEROLE",
5131 None => ""
5132 },
5133 inherit = match *inherit {
5134 Some(true) => " INHERIT",
5135 Some(false) => " NOINHERIT",
5136 None => ""
5137 },
5138 login = match *login {
5139 Some(true) => " LOGIN",
5140 Some(false) => " NOLOGIN",
5141 None => ""
5142 },
5143 replication = match *replication {
5144 Some(true) => " REPLICATION",
5145 Some(false) => " NOREPLICATION",
5146 None => ""
5147 },
5148 bypassrls = match *bypassrls {
5149 Some(true) => " BYPASSRLS",
5150 Some(false) => " NOBYPASSRLS",
5151 None => ""
5152 }
5153 )?;
5154 if let Some(limit) = connection_limit {
5155 f.write_fmt(format_args!(" CONNECTION LIMIT {0}", limit))write!(f, " CONNECTION LIMIT {limit}")?;
5156 }
5157 match password {
5158 Some(Password::Password(pass)) => f.write_fmt(format_args!(" PASSWORD {0}", pass))write!(f, " PASSWORD {pass}"),
5159 Some(Password::NullPassword) => f.write_fmt(format_args!(" PASSWORD NULL"))write!(f, " PASSWORD NULL"),
5160 None => Ok(()),
5161 }?;
5162 if let Some(until) = valid_until {
5163 f.write_fmt(format_args!(" VALID UNTIL {0}", until))write!(f, " VALID UNTIL {until}")?;
5164 }
5165 if !in_role.is_empty() {
5166 f.write_fmt(format_args!(" IN ROLE {0}", display_comma_separated(in_role)))write!(f, " IN ROLE {}", display_comma_separated(in_role))?;
5167 }
5168 if !in_group.is_empty() {
5169 f.write_fmt(format_args!(" IN GROUP {0}", display_comma_separated(in_group)))write!(f, " IN GROUP {}", display_comma_separated(in_group))?;
5170 }
5171 if !role.is_empty() {
5172 f.write_fmt(format_args!(" ROLE {0}", display_comma_separated(role)))write!(f, " ROLE {}", display_comma_separated(role))?;
5173 }
5174 if !user.is_empty() {
5175 f.write_fmt(format_args!(" USER {0}", display_comma_separated(user)))write!(f, " USER {}", display_comma_separated(user))?;
5176 }
5177 if !admin.is_empty() {
5178 f.write_fmt(format_args!(" ADMIN {0}", display_comma_separated(admin)))write!(f, " ADMIN {}", display_comma_separated(admin))?;
5179 }
5180 if let Some(owner) = authorization_owner {
5181 f.write_fmt(format_args!(" AUTHORIZATION {0}", owner))write!(f, " AUTHORIZATION {owner}")?;
5182 }
5183 Ok(())
5184 }
5185 Statement::CreateSecret {
5186 or_replace,
5187 temporary,
5188 if_not_exists,
5189 name,
5190 storage_specifier,
5191 secret_type,
5192 options,
5193 } => {
5194 f.write_fmt(format_args!("CREATE {0}",
if *or_replace { "OR REPLACE " } else { "" }))write!(
5195 f,
5196 "CREATE {or_replace}",
5197 or_replace = if *or_replace { "OR REPLACE " } else { "" },
5198 )?;
5199 if let Some(t) = temporary {
5200 f.write_fmt(format_args!("{0}",
if *t { "TEMPORARY " } else { "PERSISTENT " }))write!(f, "{}", if *t { "TEMPORARY " } else { "PERSISTENT " })?;
5201 }
5202 f.write_fmt(format_args!("SECRET {0}",
if *if_not_exists { "IF NOT EXISTS " } else { "" }))write!(
5203 f,
5204 "SECRET {if_not_exists}",
5205 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
5206 )?;
5207 if let Some(n) = name {
5208 f.write_fmt(format_args!("{0} ", n))write!(f, "{n} ")?;
5209 };
5210 if let Some(s) = storage_specifier {
5211 f.write_fmt(format_args!("IN {0} ", s))write!(f, "IN {s} ")?;
5212 }
5213 f.write_fmt(format_args!("( TYPE {0}", secret_type))write!(f, "( TYPE {secret_type}",)?;
5214 if !options.is_empty() {
5215 f.write_fmt(format_args!(", {0}", display_comma_separated(options)))write!(f, ", {o}", o = display_comma_separated(options))?;
5216 }
5217 f.write_fmt(format_args!(" )"))write!(f, " )")?;
5218 Ok(())
5219 }
5220 Statement::CreateServer(stmt) => {
5221 f.write_fmt(format_args!("{0}", stmt))write!(f, "{stmt}")
5222 }
5223 Statement::CreatePolicy {
5224 name,
5225 table_name,
5226 policy_type,
5227 command,
5228 to,
5229 using,
5230 with_check,
5231 } => {
5232 f.write_fmt(format_args!("CREATE POLICY {0} ON {1}", name, table_name))write!(f, "CREATE POLICY {name} ON {table_name}")?;
5233
5234 if let Some(policy_type) = policy_type {
5235 match policy_type {
5236 CreatePolicyType::Permissive => f.write_fmt(format_args!(" AS PERMISSIVE"))write!(f, " AS PERMISSIVE")?,
5237 CreatePolicyType::Restrictive => f.write_fmt(format_args!(" AS RESTRICTIVE"))write!(f, " AS RESTRICTIVE")?,
5238 }
5239 }
5240
5241 if let Some(command) = command {
5242 match command {
5243 CreatePolicyCommand::All => f.write_fmt(format_args!(" FOR ALL"))write!(f, " FOR ALL")?,
5244 CreatePolicyCommand::Select => f.write_fmt(format_args!(" FOR SELECT"))write!(f, " FOR SELECT")?,
5245 CreatePolicyCommand::Insert => f.write_fmt(format_args!(" FOR INSERT"))write!(f, " FOR INSERT")?,
5246 CreatePolicyCommand::Update => f.write_fmt(format_args!(" FOR UPDATE"))write!(f, " FOR UPDATE")?,
5247 CreatePolicyCommand::Delete => f.write_fmt(format_args!(" FOR DELETE"))write!(f, " FOR DELETE")?,
5248 }
5249 }
5250
5251 if let Some(to) = to {
5252 f.write_fmt(format_args!(" TO {0}", display_comma_separated(to)))write!(f, " TO {}", display_comma_separated(to))?;
5253 }
5254
5255 if let Some(using) = using {
5256 f.write_fmt(format_args!(" USING ({0})", using))write!(f, " USING ({using})")?;
5257 }
5258
5259 if let Some(with_check) = with_check {
5260 f.write_fmt(format_args!(" WITH CHECK ({0})", with_check))write!(f, " WITH CHECK ({with_check})")?;
5261 }
5262
5263 Ok(())
5264 }
5265 Statement::CreateConnector(create_connector) => create_connector.fmt(f),
5266 Statement::AlterTable {
5267 name,
5268 if_exists,
5269 only,
5270 operations,
5271 location,
5272 on_cluster,
5273 iceberg,
5274 end_token: _,
5275 } => {
5276 if *iceberg {
5277 f.write_fmt(format_args!("ALTER ICEBERG TABLE "))write!(f, "ALTER ICEBERG TABLE ")?;
5278 } else {
5279 f.write_fmt(format_args!("ALTER TABLE "))write!(f, "ALTER TABLE ")?;
5280 }
5281
5282 if *if_exists {
5283 f.write_fmt(format_args!("IF EXISTS "))write!(f, "IF EXISTS ")?;
5284 }
5285 if *only {
5286 f.write_fmt(format_args!("ONLY "))write!(f, "ONLY ")?;
5287 }
5288 f.write_fmt(format_args!("{0} ", name))write!(f, "{name} ")?;
5289 if let Some(cluster) = on_cluster {
5290 f.write_fmt(format_args!("ON CLUSTER {0} ", cluster))write!(f, "ON CLUSTER {cluster} ")?;
5291 }
5292 f.write_fmt(format_args!("{0}", display_comma_separated(operations)))write!(
5293 f,
5294 "{operations}",
5295 operations = display_comma_separated(operations)
5296 )?;
5297 if let Some(loc) = location {
5298 f.write_fmt(format_args!(" {0}", loc))write!(f, " {loc}")?
5299 }
5300 Ok(())
5301 }
5302 Statement::AlterIndex { name, operation } => {
5303 f.write_fmt(format_args!("ALTER INDEX {0} {1}", name, operation))write!(f, "ALTER INDEX {name} {operation}")
5304 }
5305 Statement::AlterView {
5306 name,
5307 columns,
5308 query,
5309 with_options,
5310 } => {
5311 f.write_fmt(format_args!("ALTER VIEW {0}", name))write!(f, "ALTER VIEW {name}")?;
5312 if !with_options.is_empty() {
5313 f.write_fmt(format_args!(" WITH ({0})",
display_comma_separated(with_options)))write!(f, " WITH ({})", display_comma_separated(with_options))?;
5314 }
5315 if !columns.is_empty() {
5316 f.write_fmt(format_args!(" ({0})", display_comma_separated(columns)))write!(f, " ({})", display_comma_separated(columns))?;
5317 }
5318 f.write_fmt(format_args!(" AS {0}", query))write!(f, " AS {query}")
5319 }
5320 Statement::AlterType(AlterType { name, operation }) => {
5321 f.write_fmt(format_args!("ALTER TYPE {0} {1}", name, operation))write!(f, "ALTER TYPE {name} {operation}")
5322 }
5323 Statement::AlterRole { name, operation } => {
5324 f.write_fmt(format_args!("ALTER ROLE {0} {1}", name, operation))write!(f, "ALTER ROLE {name} {operation}")
5325 }
5326 Statement::AlterPolicy {
5327 name,
5328 table_name,
5329 operation,
5330 } => {
5331 f.write_fmt(format_args!("ALTER POLICY {0} ON {1}{2}", name, table_name,
operation))write!(f, "ALTER POLICY {name} ON {table_name}{operation}")
5332 }
5333 Statement::AlterConnector {
5334 name,
5335 properties,
5336 url,
5337 owner,
5338 } => {
5339 f.write_fmt(format_args!("ALTER CONNECTOR {0}", name))write!(f, "ALTER CONNECTOR {name}")?;
5340 if let Some(properties) = properties {
5341 f.write_fmt(format_args!(" SET DCPROPERTIES({0})",
display_comma_separated(properties)))write!(
5342 f,
5343 " SET DCPROPERTIES({})",
5344 display_comma_separated(properties)
5345 )?;
5346 }
5347 if let Some(url) = url {
5348 f.write_fmt(format_args!(" SET URL \'{0}\'", url))write!(f, " SET URL '{url}'")?;
5349 }
5350 if let Some(owner) = owner {
5351 f.write_fmt(format_args!(" SET OWNER {0}", owner))write!(f, " SET OWNER {owner}")?;
5352 }
5353 Ok(())
5354 }
5355 Statement::AlterSession {
5356 set,
5357 session_params,
5358 } => {
5359 f.write_fmt(format_args!("ALTER SESSION {0}",
if *set { "SET" } else { "UNSET" }))write!(
5360 f,
5361 "ALTER SESSION {set}",
5362 set = if *set { "SET" } else { "UNSET" }
5363 )?;
5364 if !session_params.options.is_empty() {
5365 if *set {
5366 f.write_fmt(format_args!(" {0}", session_params))write!(f, " {session_params}")?;
5367 } else {
5368 let options = session_params
5369 .options
5370 .iter()
5371 .map(|p| p.option_name.clone())
5372 .collect::<Vec<_>>();
5373 f.write_fmt(format_args!(" {0}", display_separated(&options, ", ")))write!(f, " {}", display_separated(&options, ", "))?;
5374 }
5375 }
5376 Ok(())
5377 }
5378 Statement::Drop {
5379 object_type,
5380 if_exists,
5381 names,
5382 cascade,
5383 restrict,
5384 purge,
5385 temporary,
5386 table,
5387 } => {
5388 f.write_fmt(format_args!("DROP {0}{1}{2} {3}{4}{5}{6}",
if *temporary { "TEMPORARY " } else { "" }, object_type,
if *if_exists { " IF EXISTS" } else { "" },
display_comma_separated(names),
if *cascade { " CASCADE" } else { "" },
if *restrict { " RESTRICT" } else { "" },
if *purge { " PURGE" } else { "" }))write!(
5389 f,
5390 "DROP {}{}{} {}{}{}{}",
5391 if *temporary { "TEMPORARY " } else { "" },
5392 object_type,
5393 if *if_exists { " IF EXISTS" } else { "" },
5394 display_comma_separated(names),
5395 if *cascade { " CASCADE" } else { "" },
5396 if *restrict { " RESTRICT" } else { "" },
5397 if *purge { " PURGE" } else { "" },
5398 )?;
5399 if let Some(table_name) = table.as_ref() {
5400 f.write_fmt(format_args!(" ON {0}", table_name))write!(f, " ON {table_name}")?;
5401 };
5402 Ok(())
5403 }
5404 Statement::DropFunction {
5405 if_exists,
5406 func_desc,
5407 drop_behavior,
5408 } => {
5409 f.write_fmt(format_args!("DROP FUNCTION{0} {1}",
if *if_exists { " IF EXISTS" } else { "" },
display_comma_separated(func_desc)))write!(
5410 f,
5411 "DROP FUNCTION{} {}",
5412 if *if_exists { " IF EXISTS" } else { "" },
5413 display_comma_separated(func_desc),
5414 )?;
5415 if let Some(op) = drop_behavior {
5416 f.write_fmt(format_args!(" {0}", op))write!(f, " {op}")?;
5417 }
5418 Ok(())
5419 }
5420 Statement::DropDomain(DropDomain {
5421 if_exists,
5422 name,
5423 drop_behavior,
5424 }) => {
5425 f.write_fmt(format_args!("DROP DOMAIN{0} {1}",
if *if_exists { " IF EXISTS" } else { "" }, name))write!(
5426 f,
5427 "DROP DOMAIN{} {name}",
5428 if *if_exists { " IF EXISTS" } else { "" },
5429 )?;
5430 if let Some(op) = drop_behavior {
5431 f.write_fmt(format_args!(" {0}", op))write!(f, " {op}")?;
5432 }
5433 Ok(())
5434 }
5435 Statement::DropProcedure {
5436 if_exists,
5437 proc_desc,
5438 drop_behavior,
5439 } => {
5440 f.write_fmt(format_args!("DROP PROCEDURE{0} {1}",
if *if_exists { " IF EXISTS" } else { "" },
display_comma_separated(proc_desc)))write!(
5441 f,
5442 "DROP PROCEDURE{} {}",
5443 if *if_exists { " IF EXISTS" } else { "" },
5444 display_comma_separated(proc_desc),
5445 )?;
5446 if let Some(op) = drop_behavior {
5447 f.write_fmt(format_args!(" {0}", op))write!(f, " {op}")?;
5448 }
5449 Ok(())
5450 }
5451 Statement::DropSecret {
5452 if_exists,
5453 temporary,
5454 name,
5455 storage_specifier,
5456 } => {
5457 f.write_fmt(format_args!("DROP "))write!(f, "DROP ")?;
5458 if let Some(t) = temporary {
5459 f.write_fmt(format_args!("{0}",
if *t { "TEMPORARY " } else { "PERSISTENT " }))write!(f, "{}", if *t { "TEMPORARY " } else { "PERSISTENT " })?;
5460 }
5461 f.write_fmt(format_args!("SECRET {0}{1}",
if *if_exists { "IF EXISTS " } else { "" }, name))write!(
5462 f,
5463 "SECRET {if_exists}{name}",
5464 if_exists = if *if_exists { "IF EXISTS " } else { "" },
5465 )?;
5466 if let Some(s) = storage_specifier {
5467 f.write_fmt(format_args!(" FROM {0}", s))write!(f, " FROM {s}")?;
5468 }
5469 Ok(())
5470 }
5471 Statement::DropPolicy {
5472 if_exists,
5473 name,
5474 table_name,
5475 drop_behavior,
5476 } => {
5477 f.write_fmt(format_args!("DROP POLICY"))write!(f, "DROP POLICY")?;
5478 if *if_exists {
5479 f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
5480 }
5481 f.write_fmt(format_args!(" {0} ON {1}", name, table_name))write!(f, " {name} ON {table_name}")?;
5482 if let Some(drop_behavior) = drop_behavior {
5483 f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {drop_behavior}")?;
5484 }
5485 Ok(())
5486 }
5487 Statement::DropConnector { if_exists, name } => {
5488 f.write_fmt(format_args!("DROP CONNECTOR {0}{1}",
if *if_exists { "IF EXISTS " } else { "" }, name))write!(
5489 f,
5490 "DROP CONNECTOR {if_exists}{name}",
5491 if_exists = if *if_exists { "IF EXISTS " } else { "" }
5492 )?;
5493 Ok(())
5494 }
5495 Statement::Discard { object_type } => {
5496 f.write_fmt(format_args!("DISCARD {0}", object_type))write!(f, "DISCARD {object_type}")?;
5497 Ok(())
5498 }
5499 Self::Set(set) => f.write_fmt(format_args!("{0}", set))write!(f, "{set}"),
5500 Statement::ShowVariable { variable } => {
5501 f.write_fmt(format_args!("SHOW"))write!(f, "SHOW")?;
5502 if !variable.is_empty() {
5503 f.write_fmt(format_args!(" {0}", display_separated(variable, " ")))write!(f, " {}", display_separated(variable, " "))?;
5504 }
5505 Ok(())
5506 }
5507 Statement::ShowStatus {
5508 filter,
5509 global,
5510 session,
5511 } => {
5512 f.write_fmt(format_args!("SHOW"))write!(f, "SHOW")?;
5513 if *global {
5514 f.write_fmt(format_args!(" GLOBAL"))write!(f, " GLOBAL")?;
5515 }
5516 if *session {
5517 f.write_fmt(format_args!(" SESSION"))write!(f, " SESSION")?;
5518 }
5519 f.write_fmt(format_args!(" STATUS"))write!(f, " STATUS")?;
5520 if filter.is_some() {
5521 f.write_fmt(format_args!(" {0}", filter.as_ref().unwrap()))write!(f, " {}", filter.as_ref().unwrap())?;
5522 }
5523 Ok(())
5524 }
5525 Statement::ShowVariables {
5526 filter,
5527 global,
5528 session,
5529 } => {
5530 f.write_fmt(format_args!("SHOW"))write!(f, "SHOW")?;
5531 if *global {
5532 f.write_fmt(format_args!(" GLOBAL"))write!(f, " GLOBAL")?;
5533 }
5534 if *session {
5535 f.write_fmt(format_args!(" SESSION"))write!(f, " SESSION")?;
5536 }
5537 f.write_fmt(format_args!(" VARIABLES"))write!(f, " VARIABLES")?;
5538 if filter.is_some() {
5539 f.write_fmt(format_args!(" {0}", filter.as_ref().unwrap()))write!(f, " {}", filter.as_ref().unwrap())?;
5540 }
5541 Ok(())
5542 }
5543 Statement::ShowCreate { obj_type, obj_name } => {
5544 f.write_fmt(format_args!("SHOW CREATE {0} {1}", obj_type, obj_name))write!(f, "SHOW CREATE {obj_type} {obj_name}",)?;
5545 Ok(())
5546 }
5547 Statement::ShowColumns {
5548 extended,
5549 full,
5550 show_options,
5551 } => {
5552 f.write_fmt(format_args!("SHOW {0}{1}COLUMNS{2}",
if *extended { "EXTENDED " } else { "" },
if *full { "FULL " } else { "" }, show_options))write!(
5553 f,
5554 "SHOW {extended}{full}COLUMNS{show_options}",
5555 extended = if *extended { "EXTENDED " } else { "" },
5556 full = if *full { "FULL " } else { "" },
5557 )?;
5558 Ok(())
5559 }
5560 Statement::ShowDatabases {
5561 terse,
5562 history,
5563 show_options,
5564 } => {
5565 f.write_fmt(format_args!("SHOW {0}DATABASES{1}{2}",
if *terse { "TERSE " } else { "" },
if *history { " HISTORY" } else { "" }, show_options))write!(
5566 f,
5567 "SHOW {terse}DATABASES{history}{show_options}",
5568 terse = if *terse { "TERSE " } else { "" },
5569 history = if *history { " HISTORY" } else { "" },
5570 )?;
5571 Ok(())
5572 }
5573 Statement::ShowSchemas {
5574 terse,
5575 history,
5576 show_options,
5577 } => {
5578 f.write_fmt(format_args!("SHOW {0}SCHEMAS{1}{2}",
if *terse { "TERSE " } else { "" },
if *history { " HISTORY" } else { "" }, show_options))write!(
5579 f,
5580 "SHOW {terse}SCHEMAS{history}{show_options}",
5581 terse = if *terse { "TERSE " } else { "" },
5582 history = if *history { " HISTORY" } else { "" },
5583 )?;
5584 Ok(())
5585 }
5586 Statement::ShowObjects(ShowObjects {
5587 terse,
5588 show_options,
5589 }) => {
5590 f.write_fmt(format_args!("SHOW {0}OBJECTS{1}",
if *terse { "TERSE " } else { "" }, show_options))write!(
5591 f,
5592 "SHOW {terse}OBJECTS{show_options}",
5593 terse = if *terse { "TERSE " } else { "" },
5594 )?;
5595 Ok(())
5596 }
5597 Statement::ShowTables {
5598 terse,
5599 history,
5600 extended,
5601 full,
5602 external,
5603 show_options,
5604 } => {
5605 f.write_fmt(format_args!("SHOW {0}{1}{2}{3}TABLES{4}{5}",
if *terse { "TERSE " } else { "" },
if *extended { "EXTENDED " } else { "" },
if *full { "FULL " } else { "" },
if *external { "EXTERNAL " } else { "" },
if *history { " HISTORY" } else { "" }, show_options))write!(
5606 f,
5607 "SHOW {terse}{extended}{full}{external}TABLES{history}{show_options}",
5608 terse = if *terse { "TERSE " } else { "" },
5609 extended = if *extended { "EXTENDED " } else { "" },
5610 full = if *full { "FULL " } else { "" },
5611 external = if *external { "EXTERNAL " } else { "" },
5612 history = if *history { " HISTORY" } else { "" },
5613 )?;
5614 Ok(())
5615 }
5616 Statement::ShowViews {
5617 terse,
5618 materialized,
5619 show_options,
5620 } => {
5621 f.write_fmt(format_args!("SHOW {0}{1}VIEWS{2}",
if *terse { "TERSE " } else { "" },
if *materialized { "MATERIALIZED " } else { "" }, show_options))write!(
5622 f,
5623 "SHOW {terse}{materialized}VIEWS{show_options}",
5624 terse = if *terse { "TERSE " } else { "" },
5625 materialized = if *materialized { "MATERIALIZED " } else { "" }
5626 )?;
5627 Ok(())
5628 }
5629 Statement::ShowFunctions { filter } => {
5630 f.write_fmt(format_args!("SHOW FUNCTIONS"))write!(f, "SHOW FUNCTIONS")?;
5631 if let Some(filter) = filter {
5632 f.write_fmt(format_args!(" {0}", filter))write!(f, " {filter}")?;
5633 }
5634 Ok(())
5635 }
5636 Statement::Use(use_expr) => use_expr.fmt(f),
5637 Statement::ShowCollation { filter } => {
5638 f.write_fmt(format_args!("SHOW COLLATION"))write!(f, "SHOW COLLATION")?;
5639 if let Some(filter) = filter {
5640 f.write_fmt(format_args!(" {0}", filter))write!(f, " {filter}")?;
5641 }
5642 Ok(())
5643 }
5644 Statement::ShowCharset(show_stm) => show_stm.fmt(f),
5645 Statement::StartTransaction {
5646 modes,
5647 begin: syntax_begin,
5648 transaction,
5649 modifier,
5650 statements,
5651 exception,
5652 has_end_keyword,
5653 } => {
5654 if *syntax_begin {
5655 if let Some(modifier) = *modifier {
5656 f.write_fmt(format_args!("BEGIN {0}", modifier))write!(f, "BEGIN {modifier}")?;
5657 } else {
5658 f.write_fmt(format_args!("BEGIN"))write!(f, "BEGIN")?;
5659 }
5660 } else {
5661 f.write_fmt(format_args!("START"))write!(f, "START")?;
5662 }
5663 if let Some(transaction) = transaction {
5664 f.write_fmt(format_args!(" {0}", transaction))write!(f, " {transaction}")?;
5665 }
5666 if !modes.is_empty() {
5667 f.write_fmt(format_args!(" {0}", display_comma_separated(modes)))write!(f, " {}", display_comma_separated(modes))?;
5668 }
5669 if !statements.is_empty() {
5670 f.write_fmt(format_args!(" "))write!(f, " ")?;
5671 format_statement_list(f, statements)?;
5672 }
5673 if let Some(exception_when) = exception {
5674 f.write_fmt(format_args!(" EXCEPTION"))write!(f, " EXCEPTION")?;
5675 for when in exception_when {
5676 f.write_fmt(format_args!(" {0}", when))write!(f, " {when}")?;
5677 }
5678 }
5679 if *has_end_keyword {
5680 f.write_fmt(format_args!(" END"))write!(f, " END")?;
5681 }
5682 Ok(())
5683 }
5684 Statement::Commit {
5685 chain,
5686 end: end_syntax,
5687 modifier,
5688 } => {
5689 if *end_syntax {
5690 f.write_fmt(format_args!("END"))write!(f, "END")?;
5691 if let Some(modifier) = *modifier {
5692 f.write_fmt(format_args!(" {0}", modifier))write!(f, " {modifier}")?;
5693 }
5694 if *chain {
5695 f.write_fmt(format_args!(" AND CHAIN"))write!(f, " AND CHAIN")?;
5696 }
5697 } else {
5698 f.write_fmt(format_args!("COMMIT{0}", if *chain { " AND CHAIN" } else { "" }))write!(f, "COMMIT{}", if *chain { " AND CHAIN" } else { "" })?;
5699 }
5700 Ok(())
5701 }
5702 Statement::Rollback { chain, savepoint } => {
5703 f.write_fmt(format_args!("ROLLBACK"))write!(f, "ROLLBACK")?;
5704
5705 if *chain {
5706 f.write_fmt(format_args!(" AND CHAIN"))write!(f, " AND CHAIN")?;
5707 }
5708
5709 if let Some(savepoint) = savepoint {
5710 f.write_fmt(format_args!(" TO SAVEPOINT {0}", savepoint))write!(f, " TO SAVEPOINT {savepoint}")?;
5711 }
5712
5713 Ok(())
5714 }
5715 Statement::CreateSchema {
5716 schema_name,
5717 if_not_exists,
5718 with,
5719 options,
5720 default_collate_spec,
5721 clone,
5722 } => {
5723 f.write_fmt(format_args!("CREATE SCHEMA {0}{1}",
if *if_not_exists { "IF NOT EXISTS " } else { "" }, schema_name))write!(
5724 f,
5725 "CREATE SCHEMA {if_not_exists}{name}",
5726 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
5727 name = schema_name
5728 )?;
5729
5730 if let Some(collate) = default_collate_spec {
5731 f.write_fmt(format_args!(" DEFAULT COLLATE {0}", collate))write!(f, " DEFAULT COLLATE {collate}")?;
5732 }
5733
5734 if let Some(with) = with {
5735 f.write_fmt(format_args!(" WITH ({0})", display_comma_separated(with)))write!(f, " WITH ({})", display_comma_separated(with))?;
5736 }
5737
5738 if let Some(options) = options {
5739 f.write_fmt(format_args!(" OPTIONS({0})", display_comma_separated(options)))write!(f, " OPTIONS({})", display_comma_separated(options))?;
5740 }
5741
5742 if let Some(clone) = clone {
5743 f.write_fmt(format_args!(" CLONE {0}", clone))write!(f, " CLONE {clone}")?;
5744 }
5745 Ok(())
5746 }
5747 Statement::Assert { condition, message } => {
5748 f.write_fmt(format_args!("ASSERT {0}", condition))write!(f, "ASSERT {condition}")?;
5749 if let Some(m) = message {
5750 f.write_fmt(format_args!(" AS {0}", m))write!(f, " AS {m}")?;
5751 }
5752 Ok(())
5753 }
5754 Statement::Grant {
5755 privileges,
5756 objects,
5757 grantees,
5758 with_grant_option,
5759 as_grantor,
5760 granted_by,
5761 current_grants,
5762 } => {
5763 f.write_fmt(format_args!("GRANT {0} ", privileges))write!(f, "GRANT {privileges} ")?;
5764 if let Some(objects) = objects {
5765 f.write_fmt(format_args!("ON {0} ", objects))write!(f, "ON {objects} ")?;
5766 }
5767 f.write_fmt(format_args!("TO {0}", display_comma_separated(grantees)))write!(f, "TO {}", display_comma_separated(grantees))?;
5768 if *with_grant_option {
5769 f.write_fmt(format_args!(" WITH GRANT OPTION"))write!(f, " WITH GRANT OPTION")?;
5770 }
5771 if let Some(current_grants) = current_grants {
5772 f.write_fmt(format_args!(" {0}", current_grants))write!(f, " {current_grants}")?;
5773 }
5774 if let Some(grantor) = as_grantor {
5775 f.write_fmt(format_args!(" AS {0}", grantor))write!(f, " AS {grantor}")?;
5776 }
5777 if let Some(grantor) = granted_by {
5778 f.write_fmt(format_args!(" GRANTED BY {0}", grantor))write!(f, " GRANTED BY {grantor}")?;
5779 }
5780 Ok(())
5781 }
5782 Statement::Deny(s) => f.write_fmt(format_args!("{0}", s))write!(f, "{s}"),
5783 Statement::Revoke {
5784 privileges,
5785 objects,
5786 grantees,
5787 granted_by,
5788 cascade,
5789 } => {
5790 f.write_fmt(format_args!("REVOKE {0} ", privileges))write!(f, "REVOKE {privileges} ")?;
5791 if let Some(objects) = objects {
5792 f.write_fmt(format_args!("ON {0} ", objects))write!(f, "ON {objects} ")?;
5793 }
5794 f.write_fmt(format_args!("FROM {0}", display_comma_separated(grantees)))write!(f, "FROM {}", display_comma_separated(grantees))?;
5795 if let Some(grantor) = granted_by {
5796 f.write_fmt(format_args!(" GRANTED BY {0}", grantor))write!(f, " GRANTED BY {grantor}")?;
5797 }
5798 if let Some(cascade) = cascade {
5799 f.write_fmt(format_args!(" {0}", cascade))write!(f, " {cascade}")?;
5800 }
5801 Ok(())
5802 }
5803 Statement::Deallocate { name, prepare } => f.write_fmt(format_args!("DEALLOCATE {0}{1}",
if *prepare { "PREPARE " } else { "" }, name))write!(
5804 f,
5805 "DEALLOCATE {prepare}{name}",
5806 prepare = if *prepare { "PREPARE " } else { "" },
5807 name = name,
5808 ),
5809 Statement::Execute {
5810 name,
5811 parameters,
5812 has_parentheses,
5813 immediate,
5814 into,
5815 using,
5816 output,
5817 default,
5818 } => {
5819 let (open, close) = if *has_parentheses {
5820 ("(", ")")
5821 } else {
5822 (if parameters.is_empty() { "" } else { " " }, "")
5823 };
5824 f.write_fmt(format_args!("EXECUTE"))write!(f, "EXECUTE")?;
5825 if *immediate {
5826 f.write_fmt(format_args!(" IMMEDIATE"))write!(f, " IMMEDIATE")?;
5827 }
5828 if let Some(name) = name {
5829 f.write_fmt(format_args!(" {0}", name))write!(f, " {name}")?;
5830 }
5831 f.write_fmt(format_args!("{1}{0}{2}", display_comma_separated(parameters),
open, close))write!(f, "{open}{}{close}", display_comma_separated(parameters),)?;
5832 if !into.is_empty() {
5833 f.write_fmt(format_args!(" INTO {0}", display_comma_separated(into)))write!(f, " INTO {}", display_comma_separated(into))?;
5834 }
5835 if !using.is_empty() {
5836 f.write_fmt(format_args!(" USING {0}", display_comma_separated(using)))write!(f, " USING {}", display_comma_separated(using))?;
5837 };
5838 if *output {
5839 f.write_fmt(format_args!(" OUTPUT"))write!(f, " OUTPUT")?;
5840 }
5841 if *default {
5842 f.write_fmt(format_args!(" DEFAULT"))write!(f, " DEFAULT")?;
5843 }
5844 Ok(())
5845 }
5846 Statement::Prepare {
5847 name,
5848 data_types,
5849 statement,
5850 } => {
5851 f.write_fmt(format_args!("PREPARE {0} ", name))write!(f, "PREPARE {name} ")?;
5852 if !data_types.is_empty() {
5853 f.write_fmt(format_args!("({0}) ", display_comma_separated(data_types)))write!(f, "({}) ", display_comma_separated(data_types))?;
5854 }
5855 f.write_fmt(format_args!("AS {0}", statement))write!(f, "AS {statement}")
5856 }
5857 Statement::Comment {
5858 object_type,
5859 object_name,
5860 comment,
5861 if_exists,
5862 } => {
5863 f.write_fmt(format_args!("COMMENT "))write!(f, "COMMENT ")?;
5864 if *if_exists {
5865 f.write_fmt(format_args!("IF EXISTS "))write!(f, "IF EXISTS ")?
5866 };
5867 f.write_fmt(format_args!("ON {0} {1} IS ", object_type, object_name))write!(f, "ON {object_type} {object_name} IS ")?;
5868 if let Some(c) = comment {
5869 f.write_fmt(format_args!("\'{0}\'", c))write!(f, "'{c}'")
5870 } else {
5871 f.write_fmt(format_args!("NULL"))write!(f, "NULL")
5872 }
5873 }
5874 Statement::Savepoint { name } => {
5875 f.write_fmt(format_args!("SAVEPOINT "))write!(f, "SAVEPOINT ")?;
5876 f.write_fmt(format_args!("{0}", name))write!(f, "{name}")
5877 }
5878 Statement::ReleaseSavepoint { name } => {
5879 f.write_fmt(format_args!("RELEASE SAVEPOINT {0}", name))write!(f, "RELEASE SAVEPOINT {name}")
5880 }
5881 Statement::Merge {
5882 into,
5883 table,
5884 source,
5885 on,
5886 clauses,
5887 output,
5888 } => {
5889 f.write_fmt(format_args!("MERGE{0} {1} USING {2} ",
if *into { " INTO" } else { "" }, table, source))write!(
5890 f,
5891 "MERGE{int} {table} USING {source} ",
5892 int = if *into { " INTO" } else { "" }
5893 )?;
5894 f.write_fmt(format_args!("ON {0} ", on))write!(f, "ON {on} ")?;
5895 f.write_fmt(format_args!("{0}", display_separated(clauses, " ")))write!(f, "{}", display_separated(clauses, " "))?;
5896 if let Some(output) = output {
5897 f.write_fmt(format_args!(" {0}", output))write!(f, " {output}")?;
5898 }
5899 Ok(())
5900 }
5901 Statement::Cache {
5902 table_name,
5903 table_flag,
5904 has_as,
5905 options,
5906 query,
5907 } => {
5908 if let Some(table_flag) = table_flag {
5909 f.write_fmt(format_args!("CACHE {0} TABLE {1}", table_flag, table_name))write!(f, "CACHE {table_flag} TABLE {table_name}")?;
5910 } else {
5911 f.write_fmt(format_args!("CACHE TABLE {0}", table_name))write!(f, "CACHE TABLE {table_name}")?;
5912 }
5913
5914 if !options.is_empty() {
5915 f.write_fmt(format_args!(" OPTIONS({0})", display_comma_separated(options)))write!(f, " OPTIONS({})", display_comma_separated(options))?;
5916 }
5917
5918 match (*has_as, query) {
5919 (true, Some(query)) => f.write_fmt(format_args!(" AS {0}", query))write!(f, " AS {query}"),
5920 (true, None) => f.write_str(" AS"),
5921 (false, Some(query)) => f.write_fmt(format_args!(" {0}", query))write!(f, " {query}"),
5922 (false, None) => Ok(()),
5923 }
5924 }
5925 Statement::UNCache {
5926 table_name,
5927 if_exists,
5928 } => {
5929 if *if_exists {
5930 f.write_fmt(format_args!("UNCACHE TABLE IF EXISTS {0}", table_name))write!(f, "UNCACHE TABLE IF EXISTS {table_name}")
5931 } else {
5932 f.write_fmt(format_args!("UNCACHE TABLE {0}", table_name))write!(f, "UNCACHE TABLE {table_name}")
5933 }
5934 }
5935 Statement::CreateSequence {
5936 temporary,
5937 if_not_exists,
5938 name,
5939 data_type,
5940 sequence_options,
5941 owned_by,
5942 } => {
5943 let as_type: String = if let Some(dt) = data_type.as_ref() {
5944 [" AS ", &dt.to_string()].concat()
5947 } else {
5948 "".to_string()
5949 };
5950 f.write_fmt(format_args!("CREATE {1}SEQUENCE {0}{2}{3}",
if *if_not_exists { "IF NOT EXISTS " } else { "" },
if *temporary { "TEMPORARY " } else { "" }, name, as_type))write!(
5951 f,
5952 "CREATE {temporary}SEQUENCE {if_not_exists}{name}{as_type}",
5953 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
5954 temporary = if *temporary { "TEMPORARY " } else { "" },
5955 name = name,
5956 as_type = as_type
5957 )?;
5958 for sequence_option in sequence_options {
5959 f.write_fmt(format_args!("{0}", sequence_option))write!(f, "{sequence_option}")?;
5960 }
5961 if let Some(ob) = owned_by.as_ref() {
5962 f.write_fmt(format_args!(" OWNED BY {0}", ob))write!(f, " OWNED BY {ob}")?;
5963 }
5964 f.write_fmt(format_args!(""))write!(f, "")
5965 }
5966 Statement::CreateStage {
5967 or_replace,
5968 temporary,
5969 if_not_exists,
5970 name,
5971 stage_params,
5972 directory_table_params,
5973 file_format,
5974 copy_options,
5975 comment,
5976 ..
5977 } => {
5978 f.write_fmt(format_args!("CREATE {1}{0}STAGE {2}{3}{4}",
if *temporary { "TEMPORARY " } else { "" },
if *or_replace { "OR REPLACE " } else { "" },
if *if_not_exists { "IF NOT EXISTS " } else { "" }, name,
stage_params))write!(
5979 f,
5980 "CREATE {or_replace}{temp}STAGE {if_not_exists}{name}{stage_params}",
5981 temp = if *temporary { "TEMPORARY " } else { "" },
5982 or_replace = if *or_replace { "OR REPLACE " } else { "" },
5983 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
5984 )?;
5985 if !directory_table_params.options.is_empty() {
5986 f.write_fmt(format_args!(" DIRECTORY=({0})", directory_table_params))write!(f, " DIRECTORY=({directory_table_params})")?;
5987 }
5988 if !file_format.options.is_empty() {
5989 f.write_fmt(format_args!(" FILE_FORMAT=({0})", file_format))write!(f, " FILE_FORMAT=({file_format})")?;
5990 }
5991 if !copy_options.options.is_empty() {
5992 f.write_fmt(format_args!(" COPY_OPTIONS=({0})", copy_options))write!(f, " COPY_OPTIONS=({copy_options})")?;
5993 }
5994 if comment.is_some() {
5995 f.write_fmt(format_args!(" COMMENT=\'{0}\'", comment.as_ref().unwrap()))write!(f, " COMMENT='{}'", comment.as_ref().unwrap())?;
5996 }
5997 Ok(())
5998 }
5999 Statement::CopyIntoSnowflake {
6000 kind,
6001 into,
6002 into_columns,
6003 from_obj,
6004 from_obj_alias,
6005 stage_params,
6006 from_transformations,
6007 from_query,
6008 files,
6009 pattern,
6010 file_format,
6011 copy_options,
6012 validation_mode,
6013 partition,
6014 } => {
6015 f.write_fmt(format_args!("COPY INTO {0}", into))write!(f, "COPY INTO {into}")?;
6016 if let Some(into_columns) = into_columns {
6017 f.write_fmt(format_args!(" ({0})", display_comma_separated(into_columns)))write!(f, " ({})", display_comma_separated(into_columns))?;
6018 }
6019 if let Some(from_transformations) = from_transformations {
6020 if let Some(from_stage) = from_obj {
6022 f.write_fmt(format_args!(" FROM (SELECT {0} FROM {1}{2}",
display_separated(from_transformations, ", "), from_stage,
stage_params))write!(
6023 f,
6024 " FROM (SELECT {} FROM {}{}",
6025 display_separated(from_transformations, ", "),
6026 from_stage,
6027 stage_params
6028 )?;
6029 }
6030 if let Some(from_obj_alias) = from_obj_alias {
6031 f.write_fmt(format_args!(" AS {0}", from_obj_alias))write!(f, " AS {from_obj_alias}")?;
6032 }
6033 f.write_fmt(format_args!(")"))write!(f, ")")?;
6034 } else if let Some(from_obj) = from_obj {
6035 f.write_fmt(format_args!(" FROM {0}{1}", from_obj, stage_params))write!(f, " FROM {from_obj}{stage_params}")?;
6037 if let Some(from_obj_alias) = from_obj_alias {
6038 f.write_fmt(format_args!(" AS {0}", from_obj_alias))write!(f, " AS {from_obj_alias}")?;
6039 }
6040 } else if let Some(from_query) = from_query {
6041 f.write_fmt(format_args!(" FROM ({0})", from_query))write!(f, " FROM ({from_query})")?;
6043 }
6044
6045 if let Some(files) = files {
6046 f.write_fmt(format_args!(" FILES = (\'{0}\')",
display_separated(files, "', '")))write!(f, " FILES = ('{}')", display_separated(files, "', '"))?;
6047 }
6048 if let Some(pattern) = pattern {
6049 f.write_fmt(format_args!(" PATTERN = \'{0}\'", pattern))write!(f, " PATTERN = '{pattern}'")?;
6050 }
6051 if let Some(partition) = partition {
6052 f.write_fmt(format_args!(" PARTITION BY {0}", partition))write!(f, " PARTITION BY {partition}")?;
6053 }
6054 if !file_format.options.is_empty() {
6055 f.write_fmt(format_args!(" FILE_FORMAT=({0})", file_format))write!(f, " FILE_FORMAT=({file_format})")?;
6056 }
6057 if !copy_options.options.is_empty() {
6058 match kind {
6059 CopyIntoSnowflakeKind::Table => {
6060 f.write_fmt(format_args!(" COPY_OPTIONS=({0})", copy_options))write!(f, " COPY_OPTIONS=({copy_options})")?
6061 }
6062 CopyIntoSnowflakeKind::Location => f.write_fmt(format_args!(" {0}", copy_options))write!(f, " {copy_options}")?,
6063 }
6064 }
6065 if let Some(validation_mode) = validation_mode {
6066 f.write_fmt(format_args!(" VALIDATION_MODE = {0}", validation_mode))write!(f, " VALIDATION_MODE = {validation_mode}")?;
6067 }
6068 Ok(())
6069 }
6070 Statement::CreateType {
6071 name,
6072 representation,
6073 } => {
6074 f.write_fmt(format_args!("CREATE TYPE {0} AS {1}", name, representation))write!(f, "CREATE TYPE {name} AS {representation}")
6075 }
6076 Statement::Pragma { name, value, is_eq } => {
6077 f.write_fmt(format_args!("PRAGMA {0}", name))write!(f, "PRAGMA {name}")?;
6078 if value.is_some() {
6079 let val = value.as_ref().unwrap();
6080 if *is_eq {
6081 f.write_fmt(format_args!(" = {0}", val))write!(f, " = {val}")?;
6082 } else {
6083 f.write_fmt(format_args!("({0})", val))write!(f, "({val})")?;
6084 }
6085 }
6086 Ok(())
6087 }
6088 Statement::LockTables { tables } => {
6089 f.write_fmt(format_args!("LOCK TABLES {0}", display_comma_separated(tables)))write!(f, "LOCK TABLES {}", display_comma_separated(tables))
6090 }
6091 Statement::UnlockTables => {
6092 f.write_fmt(format_args!("UNLOCK TABLES"))write!(f, "UNLOCK TABLES")
6093 }
6094 Statement::Unload {
6095 query,
6096 query_text,
6097 to,
6098 auth,
6099 with,
6100 options,
6101 } => {
6102 f.write_fmt(format_args!("UNLOAD("))write!(f, "UNLOAD(")?;
6103 if let Some(query) = query {
6104 f.write_fmt(format_args!("{0}", query))write!(f, "{query}")?;
6105 }
6106 if let Some(query_text) = query_text {
6107 f.write_fmt(format_args!("\'{0}\'", query_text))write!(f, "'{query_text}'")?;
6108 }
6109 f.write_fmt(format_args!(") TO {0}", to))write!(f, ") TO {to}")?;
6110 if let Some(auth) = auth {
6111 f.write_fmt(format_args!(" IAM_ROLE {0}", auth))write!(f, " IAM_ROLE {auth}")?;
6112 }
6113 if !with.is_empty() {
6114 f.write_fmt(format_args!(" WITH ({0})", display_comma_separated(with)))write!(f, " WITH ({})", display_comma_separated(with))?;
6115 }
6116 if !options.is_empty() {
6117 f.write_fmt(format_args!(" {0}", display_separated(options, " ")))write!(f, " {}", display_separated(options, " "))?;
6118 }
6119 Ok(())
6120 }
6121 Statement::OptimizeTable {
6122 name,
6123 on_cluster,
6124 partition,
6125 include_final,
6126 deduplicate,
6127 } => {
6128 f.write_fmt(format_args!("OPTIMIZE TABLE {0}", name))write!(f, "OPTIMIZE TABLE {name}")?;
6129 if let Some(on_cluster) = on_cluster {
6130 f.write_fmt(format_args!(" ON CLUSTER {0}", on_cluster))write!(f, " ON CLUSTER {on_cluster}")?;
6131 }
6132 if let Some(partition) = partition {
6133 f.write_fmt(format_args!(" {0}", partition))write!(f, " {partition}")?;
6134 }
6135 if *include_final {
6136 f.write_fmt(format_args!(" FINAL"))write!(f, " FINAL")?;
6137 }
6138 if let Some(deduplicate) = deduplicate {
6139 f.write_fmt(format_args!(" {0}", deduplicate))write!(f, " {deduplicate}")?;
6140 }
6141 Ok(())
6142 }
6143 Statement::LISTEN { channel } => {
6144 f.write_fmt(format_args!("LISTEN {0}", channel))write!(f, "LISTEN {channel}")?;
6145 Ok(())
6146 }
6147 Statement::UNLISTEN { channel } => {
6148 f.write_fmt(format_args!("UNLISTEN {0}", channel))write!(f, "UNLISTEN {channel}")?;
6149 Ok(())
6150 }
6151 Statement::NOTIFY { channel, payload } => {
6152 f.write_fmt(format_args!("NOTIFY {0}", channel))write!(f, "NOTIFY {channel}")?;
6153 if let Some(payload) = payload {
6154 f.write_fmt(format_args!(", \'{0}\'", payload))write!(f, ", '{payload}'")?;
6155 }
6156 Ok(())
6157 }
6158 Statement::RenameTable(rename_tables) => {
6159 f.write_fmt(format_args!("RENAME TABLE {0}",
display_comma_separated(rename_tables)))write!(f, "RENAME TABLE {}", display_comma_separated(rename_tables))
6160 }
6161 Statement::RaisError {
6162 message,
6163 severity,
6164 state,
6165 arguments,
6166 options,
6167 } => {
6168 f.write_fmt(format_args!("RAISERROR({0}, {1}, {2}", message, severity, state))write!(f, "RAISERROR({message}, {severity}, {state}")?;
6169 if !arguments.is_empty() {
6170 f.write_fmt(format_args!(", {0}", display_comma_separated(arguments)))write!(f, ", {}", display_comma_separated(arguments))?;
6171 }
6172 f.write_fmt(format_args!(")"))write!(f, ")")?;
6173 if !options.is_empty() {
6174 f.write_fmt(format_args!(" WITH {0}", display_comma_separated(options)))write!(f, " WITH {}", display_comma_separated(options))?;
6175 }
6176 Ok(())
6177 }
6178 Statement::Print(s) => f.write_fmt(format_args!("{0}", s))write!(f, "{s}"),
6179 Statement::Return(r) => f.write_fmt(format_args!("{0}", r))write!(f, "{r}"),
6180 Statement::List(command) => f.write_fmt(format_args!("LIST {0}", command))write!(f, "LIST {command}"),
6181 Statement::Remove(command) => f.write_fmt(format_args!("REMOVE {0}", command))write!(f, "REMOVE {command}"),
6182 Statement::ExportData(e) => f.write_fmt(format_args!("{0}", e))write!(f, "{e}"),
6183 Statement::CreateUser(s) => f.write_fmt(format_args!("{0}", s))write!(f, "{s}"),
6184 Statement::AlterSchema(s) => f.write_fmt(format_args!("{0}", s))write!(f, "{s}"),
6185 Statement::Vacuum(s) => f.write_fmt(format_args!("{0}", s))write!(f, "{s}"),
6186 }
6187 }
6188}
6189
6190#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SequenceOptions {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
SequenceOptions::IncrementBy(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"IncrementBy", __self_0, &__self_1),
SequenceOptions::MinValue(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"MinValue", &__self_0),
SequenceOptions::MaxValue(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"MaxValue", &__self_0),
SequenceOptions::StartWith(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"StartWith", __self_0, &__self_1),
SequenceOptions::Cache(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Cache",
&__self_0),
SequenceOptions::Cycle(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Cycle",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SequenceOptions {
#[inline]
fn clone(&self) -> SequenceOptions {
match self {
SequenceOptions::IncrementBy(__self_0, __self_1) =>
SequenceOptions::IncrementBy(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
SequenceOptions::MinValue(__self_0) =>
SequenceOptions::MinValue(::core::clone::Clone::clone(__self_0)),
SequenceOptions::MaxValue(__self_0) =>
SequenceOptions::MaxValue(::core::clone::Clone::clone(__self_0)),
SequenceOptions::StartWith(__self_0, __self_1) =>
SequenceOptions::StartWith(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
SequenceOptions::Cache(__self_0) =>
SequenceOptions::Cache(::core::clone::Clone::clone(__self_0)),
SequenceOptions::Cycle(__self_0) =>
SequenceOptions::Cycle(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SequenceOptions {
#[inline]
fn eq(&self, other: &SequenceOptions) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(SequenceOptions::IncrementBy(__self_0, __self_1),
SequenceOptions::IncrementBy(__arg1_0, __arg1_1)) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
(SequenceOptions::MinValue(__self_0),
SequenceOptions::MinValue(__arg1_0)) =>
__self_0 == __arg1_0,
(SequenceOptions::MaxValue(__self_0),
SequenceOptions::MaxValue(__arg1_0)) =>
__self_0 == __arg1_0,
(SequenceOptions::StartWith(__self_0, __self_1),
SequenceOptions::StartWith(__arg1_0, __arg1_1)) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
(SequenceOptions::Cache(__self_0),
SequenceOptions::Cache(__arg1_0)) => __self_0 == __arg1_0,
(SequenceOptions::Cycle(__self_0),
SequenceOptions::Cycle(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SequenceOptions {
#[inline]
fn partial_cmp(&self, other: &SequenceOptions)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(SequenceOptions::IncrementBy(__self_0, __self_1),
SequenceOptions::IncrementBy(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(SequenceOptions::MinValue(__self_0),
SequenceOptions::MinValue(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SequenceOptions::MaxValue(__self_0),
SequenceOptions::MaxValue(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SequenceOptions::StartWith(__self_0, __self_1),
SequenceOptions::StartWith(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(SequenceOptions::Cache(__self_0),
SequenceOptions::Cache(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SequenceOptions::Cycle(__self_0),
SequenceOptions::Cycle(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SequenceOptions {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SequenceOptions {
#[inline]
fn cmp(&self, other: &SequenceOptions) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(SequenceOptions::IncrementBy(__self_0, __self_1),
SequenceOptions::IncrementBy(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(SequenceOptions::MinValue(__self_0),
SequenceOptions::MinValue(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SequenceOptions::MaxValue(__self_0),
SequenceOptions::MaxValue(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SequenceOptions::StartWith(__self_0, __self_1),
SequenceOptions::StartWith(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(SequenceOptions::Cache(__self_0),
SequenceOptions::Cache(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SequenceOptions::Cycle(__self_0),
SequenceOptions::Cycle(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SequenceOptions {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
SequenceOptions::IncrementBy(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
SequenceOptions::MinValue(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SequenceOptions::MaxValue(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SequenceOptions::StartWith(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
SequenceOptions::Cache(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SequenceOptions::Cycle(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
6197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6198#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SequenceOptions {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IncrementBy(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
Self::MinValue(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::MaxValue(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::StartWith(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
Self::Cache(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Cycle(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SequenceOptions {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IncrementBy(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
Self::MinValue(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::MaxValue(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::StartWith(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
Self::Cache(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Cycle(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6199pub enum SequenceOptions {
6200 IncrementBy(Expr, bool),
6201 MinValue(Option<Expr>),
6202 MaxValue(Option<Expr>),
6203 StartWith(Expr, bool),
6204 Cache(Expr),
6205 Cycle(bool),
6206}
6207
6208impl fmt::Display for SequenceOptions {
6209 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6210 match self {
6211 SequenceOptions::IncrementBy(increment, by) => {
6212 f.write_fmt(format_args!(" INCREMENT{0} {1}", if *by { " BY" } else { "" },
increment))write!(
6213 f,
6214 " INCREMENT{by} {increment}",
6215 by = if *by { " BY" } else { "" },
6216 increment = increment
6217 )
6218 }
6219 SequenceOptions::MinValue(Some(expr)) => {
6220 f.write_fmt(format_args!(" MINVALUE {0}", expr))write!(f, " MINVALUE {expr}")
6221 }
6222 SequenceOptions::MinValue(None) => {
6223 f.write_fmt(format_args!(" NO MINVALUE"))write!(f, " NO MINVALUE")
6224 }
6225 SequenceOptions::MaxValue(Some(expr)) => {
6226 f.write_fmt(format_args!(" MAXVALUE {0}", expr))write!(f, " MAXVALUE {expr}")
6227 }
6228 SequenceOptions::MaxValue(None) => {
6229 f.write_fmt(format_args!(" NO MAXVALUE"))write!(f, " NO MAXVALUE")
6230 }
6231 SequenceOptions::StartWith(start, with) => {
6232 f.write_fmt(format_args!(" START{0} {1}", if *with { " WITH" } else { "" },
start))write!(
6233 f,
6234 " START{with} {start}",
6235 with = if *with { " WITH" } else { "" },
6236 start = start
6237 )
6238 }
6239 SequenceOptions::Cache(cache) => {
6240 f.write_fmt(format_args!(" CACHE {0}", *cache))write!(f, " CACHE {}", *cache)
6241 }
6242 SequenceOptions::Cycle(no) => {
6243 f.write_fmt(format_args!(" {0}CYCLE", if *no { "NO " } else { "" }))write!(f, " {}CYCLE", if *no { "NO " } else { "" })
6244 }
6245 }
6246 }
6247}
6248
6249#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SetAssignment {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "SetAssignment",
"scope", &self.scope, "name", &self.name, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SetAssignment {
#[inline]
fn clone(&self) -> SetAssignment {
SetAssignment {
scope: ::core::clone::Clone::clone(&self.scope),
name: ::core::clone::Clone::clone(&self.name),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SetAssignment {
#[inline]
fn eq(&self, other: &SetAssignment) -> bool {
self.scope == other.scope && self.name == other.name &&
self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SetAssignment {
#[inline]
fn partial_cmp(&self, other: &SetAssignment)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.scope, &other.scope)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.name,
&other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SetAssignment {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<ContextModifier>>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SetAssignment {
#[inline]
fn cmp(&self, other: &SetAssignment) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.scope, &other.scope) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SetAssignment {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.scope, state);
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
6251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6252#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SetAssignment {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.scope, visitor)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SetAssignment {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.scope, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6253pub struct SetAssignment {
6254 pub scope: Option<ContextModifier>,
6255 pub name: ObjectName,
6256 pub value: Expr,
6257}
6258
6259impl fmt::Display for SetAssignment {
6260 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6261 f.write_fmt(format_args!("{0}{1} = {2}",
self.scope.map(|s|
::alloc::__export::must_use({
::alloc::fmt::format(format_args!("{0}", s))
})).unwrap_or_default(), self.name, self.value))write!(
6262 f,
6263 "{}{} = {}",
6264 self.scope.map(|s| format!("{s}")).unwrap_or_default(),
6265 self.name,
6266 self.value
6267 )
6268 }
6269}
6270
6271#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TruncateTableTarget {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"TruncateTableTarget", "name", &self.name, "only", &&self.only)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TruncateTableTarget {
#[inline]
fn clone(&self) -> TruncateTableTarget {
TruncateTableTarget {
name: ::core::clone::Clone::clone(&self.name),
only: ::core::clone::Clone::clone(&self.only),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TruncateTableTarget {
#[inline]
fn eq(&self, other: &TruncateTableTarget) -> bool {
self.only == other.only && self.name == other.name
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TruncateTableTarget {
#[inline]
fn partial_cmp(&self, other: &TruncateTableTarget)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.only, &other.only),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TruncateTableTarget {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TruncateTableTarget {
#[inline]
fn cmp(&self, other: &TruncateTableTarget) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.only, &other.only),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TruncateTableTarget {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.only, state)
}
}Hash)]
6275#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TruncateTableTarget {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
visitor.pre_visit_relation(&self.name)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
visitor.post_visit_relation(&self.name)?;
sqlparser::ast::Visit::visit(&self.only, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TruncateTableTarget {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
visitor.pre_visit_relation(&mut self.name)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
visitor.post_visit_relation(&mut self.name)?;
sqlparser::ast::VisitMut::visit(&mut self.only, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6277pub struct TruncateTableTarget {
6278 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
6280 pub name: ObjectName,
6281 pub only: bool,
6285}
6286
6287impl fmt::Display for TruncateTableTarget {
6288 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6289 if self.only {
6290 f.write_fmt(format_args!("ONLY "))write!(f, "ONLY ")?;
6291 };
6292 f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)
6293 }
6294}
6295
6296#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TruncateIdentityOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
TruncateIdentityOption::Restart => "Restart",
TruncateIdentityOption::Continue => "Continue",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TruncateIdentityOption {
#[inline]
fn clone(&self) -> TruncateIdentityOption {
match self {
TruncateIdentityOption::Restart =>
TruncateIdentityOption::Restart,
TruncateIdentityOption::Continue =>
TruncateIdentityOption::Continue,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TruncateIdentityOption {
#[inline]
fn eq(&self, other: &TruncateIdentityOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TruncateIdentityOption {
#[inline]
fn partial_cmp(&self, other: &TruncateIdentityOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TruncateIdentityOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TruncateIdentityOption {
#[inline]
fn cmp(&self, other: &TruncateIdentityOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TruncateIdentityOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6300#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TruncateIdentityOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Restart => {} Self::Continue => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TruncateIdentityOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Restart => {} Self::Continue => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6301pub enum TruncateIdentityOption {
6302 Restart,
6303 Continue,
6304}
6305
6306#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CascadeOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CascadeOption::Cascade => "Cascade",
CascadeOption::Restrict => "Restrict",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CascadeOption {
#[inline]
fn clone(&self) -> CascadeOption {
match self {
CascadeOption::Cascade => CascadeOption::Cascade,
CascadeOption::Restrict => CascadeOption::Restrict,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CascadeOption {
#[inline]
fn eq(&self, other: &CascadeOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CascadeOption {
#[inline]
fn partial_cmp(&self, other: &CascadeOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CascadeOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CascadeOption {
#[inline]
fn cmp(&self, other: &CascadeOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CascadeOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6310#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CascadeOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Cascade => {} Self::Restrict => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CascadeOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Cascade => {} Self::Restrict => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6311pub enum CascadeOption {
6312 Cascade,
6313 Restrict,
6314}
6315
6316impl Display for CascadeOption {
6317 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6318 match self {
6319 CascadeOption::Cascade => f.write_fmt(format_args!("CASCADE"))write!(f, "CASCADE"),
6320 CascadeOption::Restrict => f.write_fmt(format_args!("RESTRICT"))write!(f, "RESTRICT"),
6321 }
6322 }
6323}
6324
6325#[derive(#[automatically_derived]
impl ::core::fmt::Debug for BeginTransactionKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
BeginTransactionKind::Transaction => "Transaction",
BeginTransactionKind::Work => "Work",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for BeginTransactionKind {
#[inline]
fn clone(&self) -> BeginTransactionKind {
match self {
BeginTransactionKind::Transaction =>
BeginTransactionKind::Transaction,
BeginTransactionKind::Work => BeginTransactionKind::Work,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for BeginTransactionKind {
#[inline]
fn eq(&self, other: &BeginTransactionKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for BeginTransactionKind {
#[inline]
fn partial_cmp(&self, other: &BeginTransactionKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for BeginTransactionKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for BeginTransactionKind {
#[inline]
fn cmp(&self, other: &BeginTransactionKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for BeginTransactionKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6328#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for BeginTransactionKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Transaction => {} Self::Work => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for BeginTransactionKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Transaction => {} Self::Work => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6329pub enum BeginTransactionKind {
6330 Transaction,
6331 Work,
6332}
6333
6334impl Display for BeginTransactionKind {
6335 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6336 match self {
6337 BeginTransactionKind::Transaction => f.write_fmt(format_args!("TRANSACTION"))write!(f, "TRANSACTION"),
6338 BeginTransactionKind::Work => f.write_fmt(format_args!("WORK"))write!(f, "WORK"),
6339 }
6340 }
6341}
6342
6343#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MinMaxValue {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
MinMaxValue::Empty =>
::core::fmt::Formatter::write_str(f, "Empty"),
MinMaxValue::None => ::core::fmt::Formatter::write_str(f, "None"),
MinMaxValue::Some(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Some",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MinMaxValue {
#[inline]
fn clone(&self) -> MinMaxValue {
match self {
MinMaxValue::Empty => MinMaxValue::Empty,
MinMaxValue::None => MinMaxValue::None,
MinMaxValue::Some(__self_0) =>
MinMaxValue::Some(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MinMaxValue {
#[inline]
fn eq(&self, other: &MinMaxValue) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(MinMaxValue::Some(__self_0), MinMaxValue::Some(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MinMaxValue {
#[inline]
fn partial_cmp(&self, other: &MinMaxValue)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(MinMaxValue::Some(__self_0), MinMaxValue::Some(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MinMaxValue {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MinMaxValue {
#[inline]
fn cmp(&self, other: &MinMaxValue) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(MinMaxValue::Some(__self_0), MinMaxValue::Some(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MinMaxValue {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
MinMaxValue::Some(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
6346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6347#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MinMaxValue {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Empty => {}
Self::None => {}
Self::Some(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MinMaxValue {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Empty => {}
Self::None => {}
Self::Some(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6348pub enum MinMaxValue {
6349 Empty,
6351 None,
6353 Some(Expr),
6355}
6356
6357#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OnInsert {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
OnInsert::DuplicateKeyUpdate(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DuplicateKeyUpdate", &__self_0),
OnInsert::OnConflict(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"OnConflict", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OnInsert {
#[inline]
fn clone(&self) -> OnInsert {
match self {
OnInsert::DuplicateKeyUpdate(__self_0) =>
OnInsert::DuplicateKeyUpdate(::core::clone::Clone::clone(__self_0)),
OnInsert::OnConflict(__self_0) =>
OnInsert::OnConflict(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OnInsert {
#[inline]
fn eq(&self, other: &OnInsert) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(OnInsert::DuplicateKeyUpdate(__self_0),
OnInsert::DuplicateKeyUpdate(__arg1_0)) =>
__self_0 == __arg1_0,
(OnInsert::OnConflict(__self_0),
OnInsert::OnConflict(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OnInsert {
#[inline]
fn partial_cmp(&self, other: &OnInsert)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(OnInsert::DuplicateKeyUpdate(__self_0),
OnInsert::DuplicateKeyUpdate(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(OnInsert::OnConflict(__self_0), OnInsert::OnConflict(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OnInsert {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Assignment>>;
let _: ::core::cmp::AssertParamIsEq<OnConflict>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OnInsert {
#[inline]
fn cmp(&self, other: &OnInsert) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(OnInsert::DuplicateKeyUpdate(__self_0),
OnInsert::DuplicateKeyUpdate(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(OnInsert::OnConflict(__self_0),
OnInsert::OnConflict(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OnInsert {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
OnInsert::DuplicateKeyUpdate(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
OnInsert::OnConflict(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
6358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6359#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OnInsert {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DuplicateKeyUpdate(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::OnConflict(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OnInsert {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DuplicateKeyUpdate(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::OnConflict(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6360#[non_exhaustive]
6361pub enum OnInsert {
6362 DuplicateKeyUpdate(Vec<Assignment>),
6364 OnConflict(OnConflict),
6366}
6367
6368#[derive(#[automatically_derived]
impl ::core::fmt::Debug for InsertAliases {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "InsertAliases",
"row_alias", &self.row_alias, "col_aliases", &&self.col_aliases)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for InsertAliases {
#[inline]
fn clone(&self) -> InsertAliases {
InsertAliases {
row_alias: ::core::clone::Clone::clone(&self.row_alias),
col_aliases: ::core::clone::Clone::clone(&self.col_aliases),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for InsertAliases {
#[inline]
fn eq(&self, other: &InsertAliases) -> bool {
self.row_alias == other.row_alias &&
self.col_aliases == other.col_aliases
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for InsertAliases {
#[inline]
fn partial_cmp(&self, other: &InsertAliases)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.row_alias,
&other.row_alias) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.col_aliases,
&other.col_aliases),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for InsertAliases {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for InsertAliases {
#[inline]
fn cmp(&self, other: &InsertAliases) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.row_alias, &other.row_alias) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.col_aliases, &other.col_aliases),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for InsertAliases {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.row_alias, state);
::core::hash::Hash::hash(&self.col_aliases, state)
}
}Hash)]
6369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6370#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for InsertAliases {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.row_alias, visitor)?;
sqlparser::ast::Visit::visit(&self.col_aliases, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for InsertAliases {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.row_alias, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.col_aliases, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6371pub struct InsertAliases {
6372 pub row_alias: ObjectName,
6373 pub col_aliases: Option<Vec<Ident>>,
6374}
6375
6376#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OnConflict {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "OnConflict",
"conflict_target", &self.conflict_target, "action", &&self.action)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OnConflict {
#[inline]
fn clone(&self) -> OnConflict {
OnConflict {
conflict_target: ::core::clone::Clone::clone(&self.conflict_target),
action: ::core::clone::Clone::clone(&self.action),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OnConflict {
#[inline]
fn eq(&self, other: &OnConflict) -> bool {
self.conflict_target == other.conflict_target &&
self.action == other.action
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OnConflict {
#[inline]
fn partial_cmp(&self, other: &OnConflict)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.conflict_target,
&other.conflict_target) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.action,
&other.action),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OnConflict {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<ConflictTarget>>;
let _: ::core::cmp::AssertParamIsEq<OnConflictAction>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OnConflict {
#[inline]
fn cmp(&self, other: &OnConflict) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.conflict_target,
&other.conflict_target) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.action, &other.action),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OnConflict {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.conflict_target, state);
::core::hash::Hash::hash(&self.action, state)
}
}Hash)]
6377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6378#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OnConflict {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.conflict_target, visitor)?;
sqlparser::ast::Visit::visit(&self.action, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OnConflict {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.conflict_target, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.action, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6379pub struct OnConflict {
6380 pub conflict_target: Option<ConflictTarget>,
6381 pub action: OnConflictAction,
6382}
6383#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ConflictTarget {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ConflictTarget::Columns(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Columns", &__self_0),
ConflictTarget::OnConstraint(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"OnConstraint", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ConflictTarget {
#[inline]
fn clone(&self) -> ConflictTarget {
match self {
ConflictTarget::Columns(__self_0) =>
ConflictTarget::Columns(::core::clone::Clone::clone(__self_0)),
ConflictTarget::OnConstraint(__self_0) =>
ConflictTarget::OnConstraint(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ConflictTarget {
#[inline]
fn eq(&self, other: &ConflictTarget) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(ConflictTarget::Columns(__self_0),
ConflictTarget::Columns(__arg1_0)) => __self_0 == __arg1_0,
(ConflictTarget::OnConstraint(__self_0),
ConflictTarget::OnConstraint(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ConflictTarget {
#[inline]
fn partial_cmp(&self, other: &ConflictTarget)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(ConflictTarget::Columns(__self_0),
ConflictTarget::Columns(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ConflictTarget::OnConstraint(__self_0),
ConflictTarget::OnConstraint(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ConflictTarget {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ConflictTarget {
#[inline]
fn cmp(&self, other: &ConflictTarget) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(ConflictTarget::Columns(__self_0),
ConflictTarget::Columns(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ConflictTarget::OnConstraint(__self_0),
ConflictTarget::OnConstraint(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ConflictTarget {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
ConflictTarget::Columns(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
ConflictTarget::OnConstraint(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
6384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6385#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ConflictTarget {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Columns(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::OnConstraint(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ConflictTarget {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Columns(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::OnConstraint(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6386pub enum ConflictTarget {
6387 Columns(Vec<Ident>),
6388 OnConstraint(ObjectName),
6389}
6390#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OnConflictAction {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
OnConflictAction::DoNothing =>
::core::fmt::Formatter::write_str(f, "DoNothing"),
OnConflictAction::DoUpdate(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DoUpdate", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OnConflictAction {
#[inline]
fn clone(&self) -> OnConflictAction {
match self {
OnConflictAction::DoNothing => OnConflictAction::DoNothing,
OnConflictAction::DoUpdate(__self_0) =>
OnConflictAction::DoUpdate(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OnConflictAction {
#[inline]
fn eq(&self, other: &OnConflictAction) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(OnConflictAction::DoUpdate(__self_0),
OnConflictAction::DoUpdate(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OnConflictAction {
#[inline]
fn partial_cmp(&self, other: &OnConflictAction)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(OnConflictAction::DoUpdate(__self_0),
OnConflictAction::DoUpdate(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OnConflictAction {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<DoUpdate>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OnConflictAction {
#[inline]
fn cmp(&self, other: &OnConflictAction) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(OnConflictAction::DoUpdate(__self_0),
OnConflictAction::DoUpdate(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OnConflictAction {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
OnConflictAction::DoUpdate(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
6391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6392#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OnConflictAction {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DoNothing => {}
Self::DoUpdate(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OnConflictAction {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DoNothing => {}
Self::DoUpdate(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6393pub enum OnConflictAction {
6394 DoNothing,
6395 DoUpdate(DoUpdate),
6396}
6397
6398#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DoUpdate {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "DoUpdate",
"assignments", &self.assignments, "selection", &&self.selection)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DoUpdate {
#[inline]
fn clone(&self) -> DoUpdate {
DoUpdate {
assignments: ::core::clone::Clone::clone(&self.assignments),
selection: ::core::clone::Clone::clone(&self.selection),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DoUpdate {
#[inline]
fn eq(&self, other: &DoUpdate) -> bool {
self.assignments == other.assignments &&
self.selection == other.selection
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DoUpdate {
#[inline]
fn partial_cmp(&self, other: &DoUpdate)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.assignments,
&other.assignments) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.selection,
&other.selection),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DoUpdate {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Assignment>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DoUpdate {
#[inline]
fn cmp(&self, other: &DoUpdate) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.assignments, &other.assignments) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.selection, &other.selection),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DoUpdate {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.assignments, state);
::core::hash::Hash::hash(&self.selection, state)
}
}Hash)]
6399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6400#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DoUpdate {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.assignments, visitor)?;
sqlparser::ast::Visit::visit(&self.selection, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DoUpdate {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.assignments, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.selection, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6401pub struct DoUpdate {
6402 pub assignments: Vec<Assignment>,
6404 pub selection: Option<Expr>,
6406}
6407
6408impl fmt::Display for OnInsert {
6409 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6410 match self {
6411 Self::DuplicateKeyUpdate(expr) => f.write_fmt(format_args!(" ON DUPLICATE KEY UPDATE {0}",
display_comma_separated(expr)))write!(
6412 f,
6413 " ON DUPLICATE KEY UPDATE {}",
6414 display_comma_separated(expr)
6415 ),
6416 Self::OnConflict(o) => f.write_fmt(format_args!("{0}", o))write!(f, "{o}"),
6417 }
6418 }
6419}
6420impl fmt::Display for OnConflict {
6421 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6422 f.write_fmt(format_args!(" ON CONFLICT"))write!(f, " ON CONFLICT")?;
6423 if let Some(target) = &self.conflict_target {
6424 f.write_fmt(format_args!("{0}", target))write!(f, "{target}")?;
6425 }
6426 f.write_fmt(format_args!(" {0}", self.action))write!(f, " {}", self.action)
6427 }
6428}
6429impl fmt::Display for ConflictTarget {
6430 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6431 match self {
6432 ConflictTarget::Columns(cols) => f.write_fmt(format_args!("({0})", display_comma_separated(cols)))write!(f, "({})", display_comma_separated(cols)),
6433 ConflictTarget::OnConstraint(name) => f.write_fmt(format_args!(" ON CONSTRAINT {0}", name))write!(f, " ON CONSTRAINT {name}"),
6434 }
6435 }
6436}
6437impl fmt::Display for OnConflictAction {
6438 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6439 match self {
6440 Self::DoNothing => f.write_fmt(format_args!("DO NOTHING"))write!(f, "DO NOTHING"),
6441 Self::DoUpdate(do_update) => {
6442 f.write_fmt(format_args!("DO UPDATE"))write!(f, "DO UPDATE")?;
6443 if !do_update.assignments.is_empty() {
6444 f.write_fmt(format_args!(" SET {0}",
display_comma_separated(&do_update.assignments)))write!(
6445 f,
6446 " SET {}",
6447 display_comma_separated(&do_update.assignments)
6448 )?;
6449 }
6450 if let Some(selection) = &do_update.selection {
6451 f.write_fmt(format_args!(" WHERE {0}", selection))write!(f, " WHERE {selection}")?;
6452 }
6453 Ok(())
6454 }
6455 }
6456 }
6457}
6458
6459#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Privileges {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Privileges::All { with_privileges_keyword: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "All",
"with_privileges_keyword", &__self_0),
Privileges::Actions(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Actions", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Privileges {
#[inline]
fn clone(&self) -> Privileges {
match self {
Privileges::All { with_privileges_keyword: __self_0 } =>
Privileges::All {
with_privileges_keyword: ::core::clone::Clone::clone(__self_0),
},
Privileges::Actions(__self_0) =>
Privileges::Actions(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Privileges {
#[inline]
fn eq(&self, other: &Privileges) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Privileges::All { with_privileges_keyword: __self_0 },
Privileges::All { with_privileges_keyword: __arg1_0 }) =>
__self_0 == __arg1_0,
(Privileges::Actions(__self_0), Privileges::Actions(__arg1_0))
=> __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Privileges {
#[inline]
fn partial_cmp(&self, other: &Privileges)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(Privileges::All { with_privileges_keyword: __self_0 },
Privileges::All { with_privileges_keyword: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Privileges::Actions(__self_0), Privileges::Actions(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Privileges {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Vec<Action>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Privileges {
#[inline]
fn cmp(&self, other: &Privileges) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Privileges::All { with_privileges_keyword: __self_0 },
Privileges::All { with_privileges_keyword: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Privileges::Actions(__self_0),
Privileges::Actions(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Privileges {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Privileges::All { with_privileges_keyword: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Privileges::Actions(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
6461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6462#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Privileges {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::All { with_privileges_keyword } => {
sqlparser::ast::Visit::visit(with_privileges_keyword,
visitor)?;
}
Self::Actions(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Privileges {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::All { with_privileges_keyword } => {
sqlparser::ast::VisitMut::visit(with_privileges_keyword,
visitor)?;
}
Self::Actions(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6463pub enum Privileges {
6464 All {
6466 with_privileges_keyword: bool,
6468 },
6469 Actions(Vec<Action>),
6471}
6472
6473impl fmt::Display for Privileges {
6474 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6475 match self {
6476 Privileges::All {
6477 with_privileges_keyword,
6478 } => {
6479 f.write_fmt(format_args!("ALL{0}",
if *with_privileges_keyword { " PRIVILEGES" } else { "" }))write!(
6480 f,
6481 "ALL{}",
6482 if *with_privileges_keyword {
6483 " PRIVILEGES"
6484 } else {
6485 ""
6486 }
6487 )
6488 }
6489 Privileges::Actions(actions) => {
6490 f.write_fmt(format_args!("{0}", display_comma_separated(actions)))write!(f, "{}", display_comma_separated(actions))
6491 }
6492 }
6493 }
6494}
6495
6496#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FetchDirection {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
FetchDirection::Count { limit: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Count",
"limit", &__self_0),
FetchDirection::Next =>
::core::fmt::Formatter::write_str(f, "Next"),
FetchDirection::Prior =>
::core::fmt::Formatter::write_str(f, "Prior"),
FetchDirection::First =>
::core::fmt::Formatter::write_str(f, "First"),
FetchDirection::Last =>
::core::fmt::Formatter::write_str(f, "Last"),
FetchDirection::Absolute { limit: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Absolute", "limit", &__self_0),
FetchDirection::Relative { limit: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Relative", "limit", &__self_0),
FetchDirection::All =>
::core::fmt::Formatter::write_str(f, "All"),
FetchDirection::Forward { limit: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Forward", "limit", &__self_0),
FetchDirection::ForwardAll =>
::core::fmt::Formatter::write_str(f, "ForwardAll"),
FetchDirection::Backward { limit: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Backward", "limit", &__self_0),
FetchDirection::BackwardAll =>
::core::fmt::Formatter::write_str(f, "BackwardAll"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FetchDirection {
#[inline]
fn clone(&self) -> FetchDirection {
match self {
FetchDirection::Count { limit: __self_0 } =>
FetchDirection::Count {
limit: ::core::clone::Clone::clone(__self_0),
},
FetchDirection::Next => FetchDirection::Next,
FetchDirection::Prior => FetchDirection::Prior,
FetchDirection::First => FetchDirection::First,
FetchDirection::Last => FetchDirection::Last,
FetchDirection::Absolute { limit: __self_0 } =>
FetchDirection::Absolute {
limit: ::core::clone::Clone::clone(__self_0),
},
FetchDirection::Relative { limit: __self_0 } =>
FetchDirection::Relative {
limit: ::core::clone::Clone::clone(__self_0),
},
FetchDirection::All => FetchDirection::All,
FetchDirection::Forward { limit: __self_0 } =>
FetchDirection::Forward {
limit: ::core::clone::Clone::clone(__self_0),
},
FetchDirection::ForwardAll => FetchDirection::ForwardAll,
FetchDirection::Backward { limit: __self_0 } =>
FetchDirection::Backward {
limit: ::core::clone::Clone::clone(__self_0),
},
FetchDirection::BackwardAll => FetchDirection::BackwardAll,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FetchDirection {
#[inline]
fn eq(&self, other: &FetchDirection) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(FetchDirection::Count { limit: __self_0 },
FetchDirection::Count { limit: __arg1_0 }) =>
__self_0 == __arg1_0,
(FetchDirection::Absolute { limit: __self_0 },
FetchDirection::Absolute { limit: __arg1_0 }) =>
__self_0 == __arg1_0,
(FetchDirection::Relative { limit: __self_0 },
FetchDirection::Relative { limit: __arg1_0 }) =>
__self_0 == __arg1_0,
(FetchDirection::Forward { limit: __self_0 },
FetchDirection::Forward { limit: __arg1_0 }) =>
__self_0 == __arg1_0,
(FetchDirection::Backward { limit: __self_0 },
FetchDirection::Backward { limit: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FetchDirection {
#[inline]
fn partial_cmp(&self, other: &FetchDirection)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match (self, other) {
(FetchDirection::Count { limit: __self_0 },
FetchDirection::Count { limit: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FetchDirection::Absolute { limit: __self_0 },
FetchDirection::Absolute { limit: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FetchDirection::Relative { limit: __self_0 },
FetchDirection::Relative { limit: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FetchDirection::Forward { limit: __self_0 },
FetchDirection::Forward { limit: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FetchDirection::Backward { limit: __self_0 },
FetchDirection::Backward { limit: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::option::Option::Some(::core::cmp::Ordering::Equal),
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FetchDirection {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Value>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FetchDirection {
#[inline]
fn cmp(&self, other: &FetchDirection) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(FetchDirection::Count { limit: __self_0 },
FetchDirection::Count { limit: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FetchDirection::Absolute { limit: __self_0 },
FetchDirection::Absolute { limit: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FetchDirection::Relative { limit: __self_0 },
FetchDirection::Relative { limit: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FetchDirection::Forward { limit: __self_0 },
FetchDirection::Forward { limit: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FetchDirection::Backward { limit: __self_0 },
FetchDirection::Backward { limit: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FetchDirection {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
FetchDirection::Count { limit: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
FetchDirection::Absolute { limit: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
FetchDirection::Relative { limit: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
FetchDirection::Forward { limit: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
FetchDirection::Backward { limit: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
6498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6499#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FetchDirection {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Count { limit } => {
sqlparser::ast::Visit::visit(limit, visitor)?;
}
Self::Next => {}
Self::Prior => {}
Self::First => {}
Self::Last => {}
Self::Absolute { limit } => {
sqlparser::ast::Visit::visit(limit, visitor)?;
}
Self::Relative { limit } => {
sqlparser::ast::Visit::visit(limit, visitor)?;
}
Self::All => {}
Self::Forward { limit } => {
sqlparser::ast::Visit::visit(limit, visitor)?;
}
Self::ForwardAll => {}
Self::Backward { limit } => {
sqlparser::ast::Visit::visit(limit, visitor)?;
}
Self::BackwardAll => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FetchDirection {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Count { limit } => {
sqlparser::ast::VisitMut::visit(limit, visitor)?;
}
Self::Next => {}
Self::Prior => {}
Self::First => {}
Self::Last => {}
Self::Absolute { limit } => {
sqlparser::ast::VisitMut::visit(limit, visitor)?;
}
Self::Relative { limit } => {
sqlparser::ast::VisitMut::visit(limit, visitor)?;
}
Self::All => {}
Self::Forward { limit } => {
sqlparser::ast::VisitMut::visit(limit, visitor)?;
}
Self::ForwardAll => {}
Self::Backward { limit } => {
sqlparser::ast::VisitMut::visit(limit, visitor)?;
}
Self::BackwardAll => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6500pub enum FetchDirection {
6501 Count { limit: Value },
6502 Next,
6503 Prior,
6504 First,
6505 Last,
6506 Absolute { limit: Value },
6507 Relative { limit: Value },
6508 All,
6509 Forward { limit: Option<Value> },
6512 ForwardAll,
6513 Backward { limit: Option<Value> },
6516 BackwardAll,
6517}
6518
6519impl fmt::Display for FetchDirection {
6520 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6521 match self {
6522 FetchDirection::Count { limit } => f.write_str(&limit.to_string())?,
6523 FetchDirection::Next => f.write_str("NEXT")?,
6524 FetchDirection::Prior => f.write_str("PRIOR")?,
6525 FetchDirection::First => f.write_str("FIRST")?,
6526 FetchDirection::Last => f.write_str("LAST")?,
6527 FetchDirection::Absolute { limit } => {
6528 f.write_str("ABSOLUTE ")?;
6529 f.write_str(&limit.to_string())?;
6530 }
6531 FetchDirection::Relative { limit } => {
6532 f.write_str("RELATIVE ")?;
6533 f.write_str(&limit.to_string())?;
6534 }
6535 FetchDirection::All => f.write_str("ALL")?,
6536 FetchDirection::Forward { limit } => {
6537 f.write_str("FORWARD")?;
6538
6539 if let Some(l) = limit {
6540 f.write_str(" ")?;
6541 f.write_str(&l.to_string())?;
6542 }
6543 }
6544 FetchDirection::ForwardAll => f.write_str("FORWARD ALL")?,
6545 FetchDirection::Backward { limit } => {
6546 f.write_str("BACKWARD")?;
6547
6548 if let Some(l) = limit {
6549 f.write_str(" ")?;
6550 f.write_str(&l.to_string())?;
6551 }
6552 }
6553 FetchDirection::BackwardAll => f.write_str("BACKWARD ALL")?,
6554 };
6555
6556 Ok(())
6557 }
6558}
6559
6560#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FetchPosition {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FetchPosition::From => "From",
FetchPosition::In => "In",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FetchPosition {
#[inline]
fn clone(&self) -> FetchPosition {
match self {
FetchPosition::From => FetchPosition::From,
FetchPosition::In => FetchPosition::In,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FetchPosition {
#[inline]
fn eq(&self, other: &FetchPosition) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FetchPosition {
#[inline]
fn partial_cmp(&self, other: &FetchPosition)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FetchPosition {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FetchPosition {
#[inline]
fn cmp(&self, other: &FetchPosition) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FetchPosition {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6565#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FetchPosition {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::From => {} Self::In => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FetchPosition {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::From => {} Self::In => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6566pub enum FetchPosition {
6567 From,
6568 In,
6569}
6570
6571impl fmt::Display for FetchPosition {
6572 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6573 match self {
6574 FetchPosition::From => f.write_str("FROM")?,
6575 FetchPosition::In => f.write_str("IN")?,
6576 };
6577
6578 Ok(())
6579 }
6580}
6581
6582#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Action {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
Action::AddSearchOptimization =>
::core::fmt::Formatter::write_str(f, "AddSearchOptimization"),
Action::Apply { apply_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Apply",
"apply_type", &__self_0),
Action::ApplyBudget =>
::core::fmt::Formatter::write_str(f, "ApplyBudget"),
Action::AttachListing =>
::core::fmt::Formatter::write_str(f, "AttachListing"),
Action::AttachPolicy =>
::core::fmt::Formatter::write_str(f, "AttachPolicy"),
Action::Audit => ::core::fmt::Formatter::write_str(f, "Audit"),
Action::BindServiceEndpoint =>
::core::fmt::Formatter::write_str(f, "BindServiceEndpoint"),
Action::Connect =>
::core::fmt::Formatter::write_str(f, "Connect"),
Action::Create { obj_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Create", "obj_type", &__self_0),
Action::DatabaseRole { role: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"DatabaseRole", "role", &__self_0),
Action::Delete => ::core::fmt::Formatter::write_str(f, "Delete"),
Action::Drop => ::core::fmt::Formatter::write_str(f, "Drop"),
Action::EvolveSchema =>
::core::fmt::Formatter::write_str(f, "EvolveSchema"),
Action::Exec { obj_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Exec",
"obj_type", &__self_0),
Action::Execute { obj_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Execute", "obj_type", &__self_0),
Action::Failover =>
::core::fmt::Formatter::write_str(f, "Failover"),
Action::ImportedPrivileges =>
::core::fmt::Formatter::write_str(f, "ImportedPrivileges"),
Action::ImportShare =>
::core::fmt::Formatter::write_str(f, "ImportShare"),
Action::Insert { columns: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Insert", "columns", &__self_0),
Action::Manage { manage_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Manage", "manage_type", &__self_0),
Action::ManageReleases =>
::core::fmt::Formatter::write_str(f, "ManageReleases"),
Action::ManageVersions =>
::core::fmt::Formatter::write_str(f, "ManageVersions"),
Action::Modify { modify_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Modify", "modify_type", &__self_0),
Action::Monitor { monitor_type: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Monitor", "monitor_type", &__self_0),
Action::Operate =>
::core::fmt::Formatter::write_str(f, "Operate"),
Action::OverrideShareRestrictions =>
::core::fmt::Formatter::write_str(f,
"OverrideShareRestrictions"),
Action::Ownership =>
::core::fmt::Formatter::write_str(f, "Ownership"),
Action::PurchaseDataExchangeListing =>
::core::fmt::Formatter::write_str(f,
"PurchaseDataExchangeListing"),
Action::Read => ::core::fmt::Formatter::write_str(f, "Read"),
Action::ReadSession =>
::core::fmt::Formatter::write_str(f, "ReadSession"),
Action::References { columns: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"References", "columns", &__self_0),
Action::Replicate =>
::core::fmt::Formatter::write_str(f, "Replicate"),
Action::ResolveAll =>
::core::fmt::Formatter::write_str(f, "ResolveAll"),
Action::Role { role: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Role",
"role", &__self_0),
Action::Select { columns: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Select", "columns", &__self_0),
Action::Temporary =>
::core::fmt::Formatter::write_str(f, "Temporary"),
Action::Trigger =>
::core::fmt::Formatter::write_str(f, "Trigger"),
Action::Truncate =>
::core::fmt::Formatter::write_str(f, "Truncate"),
Action::Update { columns: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Update", "columns", &__self_0),
Action::Usage => ::core::fmt::Formatter::write_str(f, "Usage"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Action {
#[inline]
fn clone(&self) -> Action {
match self {
Action::AddSearchOptimization => Action::AddSearchOptimization,
Action::Apply { apply_type: __self_0 } =>
Action::Apply {
apply_type: ::core::clone::Clone::clone(__self_0),
},
Action::ApplyBudget => Action::ApplyBudget,
Action::AttachListing => Action::AttachListing,
Action::AttachPolicy => Action::AttachPolicy,
Action::Audit => Action::Audit,
Action::BindServiceEndpoint => Action::BindServiceEndpoint,
Action::Connect => Action::Connect,
Action::Create { obj_type: __self_0 } =>
Action::Create {
obj_type: ::core::clone::Clone::clone(__self_0),
},
Action::DatabaseRole { role: __self_0 } =>
Action::DatabaseRole {
role: ::core::clone::Clone::clone(__self_0),
},
Action::Delete => Action::Delete,
Action::Drop => Action::Drop,
Action::EvolveSchema => Action::EvolveSchema,
Action::Exec { obj_type: __self_0 } =>
Action::Exec {
obj_type: ::core::clone::Clone::clone(__self_0),
},
Action::Execute { obj_type: __self_0 } =>
Action::Execute {
obj_type: ::core::clone::Clone::clone(__self_0),
},
Action::Failover => Action::Failover,
Action::ImportedPrivileges => Action::ImportedPrivileges,
Action::ImportShare => Action::ImportShare,
Action::Insert { columns: __self_0 } =>
Action::Insert {
columns: ::core::clone::Clone::clone(__self_0),
},
Action::Manage { manage_type: __self_0 } =>
Action::Manage {
manage_type: ::core::clone::Clone::clone(__self_0),
},
Action::ManageReleases => Action::ManageReleases,
Action::ManageVersions => Action::ManageVersions,
Action::Modify { modify_type: __self_0 } =>
Action::Modify {
modify_type: ::core::clone::Clone::clone(__self_0),
},
Action::Monitor { monitor_type: __self_0 } =>
Action::Monitor {
monitor_type: ::core::clone::Clone::clone(__self_0),
},
Action::Operate => Action::Operate,
Action::OverrideShareRestrictions =>
Action::OverrideShareRestrictions,
Action::Ownership => Action::Ownership,
Action::PurchaseDataExchangeListing =>
Action::PurchaseDataExchangeListing,
Action::Read => Action::Read,
Action::ReadSession => Action::ReadSession,
Action::References { columns: __self_0 } =>
Action::References {
columns: ::core::clone::Clone::clone(__self_0),
},
Action::Replicate => Action::Replicate,
Action::ResolveAll => Action::ResolveAll,
Action::Role { role: __self_0 } =>
Action::Role { role: ::core::clone::Clone::clone(__self_0) },
Action::Select { columns: __self_0 } =>
Action::Select {
columns: ::core::clone::Clone::clone(__self_0),
},
Action::Temporary => Action::Temporary,
Action::Trigger => Action::Trigger,
Action::Truncate => Action::Truncate,
Action::Update { columns: __self_0 } =>
Action::Update {
columns: ::core::clone::Clone::clone(__self_0),
},
Action::Usage => Action::Usage,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Action {
#[inline]
fn eq(&self, other: &Action) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(Action::Apply { apply_type: __self_0 }, Action::Apply {
apply_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Create { obj_type: __self_0 }, Action::Create {
obj_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::DatabaseRole { role: __self_0 },
Action::DatabaseRole { role: __arg1_0 }) =>
__self_0 == __arg1_0,
(Action::Exec { obj_type: __self_0 }, Action::Exec {
obj_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Execute { obj_type: __self_0 }, Action::Execute {
obj_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Insert { columns: __self_0 }, Action::Insert {
columns: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Manage { manage_type: __self_0 }, Action::Manage {
manage_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Modify { modify_type: __self_0 }, Action::Modify {
modify_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Monitor { monitor_type: __self_0 }, Action::Monitor {
monitor_type: __arg1_0 }) => __self_0 == __arg1_0,
(Action::References { columns: __self_0 },
Action::References { columns: __arg1_0 }) =>
__self_0 == __arg1_0,
(Action::Role { role: __self_0 }, Action::Role {
role: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Select { columns: __self_0 }, Action::Select {
columns: __arg1_0 }) => __self_0 == __arg1_0,
(Action::Update { columns: __self_0 }, Action::Update {
columns: __arg1_0 }) => __self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Action {
#[inline]
fn partial_cmp(&self, other: &Action)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match (self, other) {
(Action::Apply { apply_type: __self_0 }, Action::Apply {
apply_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Create { obj_type: __self_0 }, Action::Create {
obj_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::DatabaseRole { role: __self_0 },
Action::DatabaseRole { role: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Exec { obj_type: __self_0 }, Action::Exec {
obj_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Execute { obj_type: __self_0 }, Action::Execute {
obj_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Insert { columns: __self_0 }, Action::Insert {
columns: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Manage { manage_type: __self_0 }, Action::Manage {
manage_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Modify { modify_type: __self_0 }, Action::Modify {
modify_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Monitor { monitor_type: __self_0 },
Action::Monitor { monitor_type: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::References { columns: __self_0 },
Action::References { columns: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Role { role: __self_0 }, Action::Role {
role: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Select { columns: __self_0 }, Action::Select {
columns: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(Action::Update { columns: __self_0 }, Action::Update {
columns: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::option::Option::Some(::core::cmp::Ordering::Equal),
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Action {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ActionApplyType>;
let _: ::core::cmp::AssertParamIsEq<Option<ActionCreateObjectType>>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Option<ActionExecuteObjectType>>;
let _: ::core::cmp::AssertParamIsEq<Option<ActionExecuteObjectType>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
let _: ::core::cmp::AssertParamIsEq<ActionManageType>;
let _: ::core::cmp::AssertParamIsEq<Option<ActionModifyType>>;
let _: ::core::cmp::AssertParamIsEq<Option<ActionMonitorType>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Action {
#[inline]
fn cmp(&self, other: &Action) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(Action::Apply { apply_type: __self_0 }, Action::Apply {
apply_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Create { obj_type: __self_0 }, Action::Create {
obj_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::DatabaseRole { role: __self_0 },
Action::DatabaseRole { role: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Exec { obj_type: __self_0 }, Action::Exec {
obj_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Execute { obj_type: __self_0 }, Action::Execute {
obj_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Insert { columns: __self_0 }, Action::Insert {
columns: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Manage { manage_type: __self_0 }, Action::Manage {
manage_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Modify { modify_type: __self_0 }, Action::Modify {
modify_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Monitor { monitor_type: __self_0 },
Action::Monitor { monitor_type: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::References { columns: __self_0 },
Action::References { columns: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Role { role: __self_0 }, Action::Role {
role: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Select { columns: __self_0 }, Action::Select {
columns: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(Action::Update { columns: __self_0 }, Action::Update {
columns: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Action {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
Action::Apply { apply_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Create { obj_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::DatabaseRole { role: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Exec { obj_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Execute { obj_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Insert { columns: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Manage { manage_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Modify { modify_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Monitor { monitor_type: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::References { columns: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Role { role: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Select { columns: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
Action::Update { columns: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
6584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6585#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Action {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AddSearchOptimization => {}
Self::Apply { apply_type } => {
sqlparser::ast::Visit::visit(apply_type, visitor)?;
}
Self::ApplyBudget => {}
Self::AttachListing => {}
Self::AttachPolicy => {}
Self::Audit => {}
Self::BindServiceEndpoint => {}
Self::Connect => {}
Self::Create { obj_type } => {
sqlparser::ast::Visit::visit(obj_type, visitor)?;
}
Self::DatabaseRole { role } => {
sqlparser::ast::Visit::visit(role, visitor)?;
}
Self::Delete => {}
Self::Drop => {}
Self::EvolveSchema => {}
Self::Exec { obj_type } => {
sqlparser::ast::Visit::visit(obj_type, visitor)?;
}
Self::Execute { obj_type } => {
sqlparser::ast::Visit::visit(obj_type, visitor)?;
}
Self::Failover => {}
Self::ImportedPrivileges => {}
Self::ImportShare => {}
Self::Insert { columns } => {
sqlparser::ast::Visit::visit(columns, visitor)?;
}
Self::Manage { manage_type } => {
sqlparser::ast::Visit::visit(manage_type, visitor)?;
}
Self::ManageReleases => {}
Self::ManageVersions => {}
Self::Modify { modify_type } => {
sqlparser::ast::Visit::visit(modify_type, visitor)?;
}
Self::Monitor { monitor_type } => {
sqlparser::ast::Visit::visit(monitor_type, visitor)?;
}
Self::Operate => {}
Self::OverrideShareRestrictions => {}
Self::Ownership => {}
Self::PurchaseDataExchangeListing => {}
Self::Read => {}
Self::ReadSession => {}
Self::References { columns } => {
sqlparser::ast::Visit::visit(columns, visitor)?;
}
Self::Replicate => {}
Self::ResolveAll => {}
Self::Role { role } => {
sqlparser::ast::Visit::visit(role, visitor)?;
}
Self::Select { columns } => {
sqlparser::ast::Visit::visit(columns, visitor)?;
}
Self::Temporary => {}
Self::Trigger => {}
Self::Truncate => {}
Self::Update { columns } => {
sqlparser::ast::Visit::visit(columns, visitor)?;
}
Self::Usage => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Action {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AddSearchOptimization => {}
Self::Apply { apply_type } => {
sqlparser::ast::VisitMut::visit(apply_type, visitor)?;
}
Self::ApplyBudget => {}
Self::AttachListing => {}
Self::AttachPolicy => {}
Self::Audit => {}
Self::BindServiceEndpoint => {}
Self::Connect => {}
Self::Create { obj_type } => {
sqlparser::ast::VisitMut::visit(obj_type, visitor)?;
}
Self::DatabaseRole { role } => {
sqlparser::ast::VisitMut::visit(role, visitor)?;
}
Self::Delete => {}
Self::Drop => {}
Self::EvolveSchema => {}
Self::Exec { obj_type } => {
sqlparser::ast::VisitMut::visit(obj_type, visitor)?;
}
Self::Execute { obj_type } => {
sqlparser::ast::VisitMut::visit(obj_type, visitor)?;
}
Self::Failover => {}
Self::ImportedPrivileges => {}
Self::ImportShare => {}
Self::Insert { columns } => {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
}
Self::Manage { manage_type } => {
sqlparser::ast::VisitMut::visit(manage_type, visitor)?;
}
Self::ManageReleases => {}
Self::ManageVersions => {}
Self::Modify { modify_type } => {
sqlparser::ast::VisitMut::visit(modify_type, visitor)?;
}
Self::Monitor { monitor_type } => {
sqlparser::ast::VisitMut::visit(monitor_type, visitor)?;
}
Self::Operate => {}
Self::OverrideShareRestrictions => {}
Self::Ownership => {}
Self::PurchaseDataExchangeListing => {}
Self::Read => {}
Self::ReadSession => {}
Self::References { columns } => {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
}
Self::Replicate => {}
Self::ResolveAll => {}
Self::Role { role } => {
sqlparser::ast::VisitMut::visit(role, visitor)?;
}
Self::Select { columns } => {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
}
Self::Temporary => {}
Self::Trigger => {}
Self::Truncate => {}
Self::Update { columns } => {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
}
Self::Usage => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6586pub enum Action {
6587 AddSearchOptimization,
6588 Apply {
6589 apply_type: ActionApplyType,
6590 },
6591 ApplyBudget,
6592 AttachListing,
6593 AttachPolicy,
6594 Audit,
6595 BindServiceEndpoint,
6596 Connect,
6597 Create {
6598 obj_type: Option<ActionCreateObjectType>,
6599 },
6600 DatabaseRole {
6601 role: ObjectName,
6602 },
6603 Delete,
6604 Drop,
6605 EvolveSchema,
6606 Exec {
6607 obj_type: Option<ActionExecuteObjectType>,
6608 },
6609 Execute {
6610 obj_type: Option<ActionExecuteObjectType>,
6611 },
6612 Failover,
6613 ImportedPrivileges,
6614 ImportShare,
6615 Insert {
6616 columns: Option<Vec<Ident>>,
6617 },
6618 Manage {
6619 manage_type: ActionManageType,
6620 },
6621 ManageReleases,
6622 ManageVersions,
6623 Modify {
6624 modify_type: Option<ActionModifyType>,
6625 },
6626 Monitor {
6627 monitor_type: Option<ActionMonitorType>,
6628 },
6629 Operate,
6630 OverrideShareRestrictions,
6631 Ownership,
6632 PurchaseDataExchangeListing,
6633 Read,
6634 ReadSession,
6635 References {
6636 columns: Option<Vec<Ident>>,
6637 },
6638 Replicate,
6639 ResolveAll,
6640 Role {
6641 role: ObjectName,
6642 },
6643 Select {
6644 columns: Option<Vec<Ident>>,
6645 },
6646 Temporary,
6647 Trigger,
6648 Truncate,
6649 Update {
6650 columns: Option<Vec<Ident>>,
6651 },
6652 Usage,
6653}
6654
6655impl fmt::Display for Action {
6656 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6657 match self {
6658 Action::AddSearchOptimization => f.write_str("ADD SEARCH OPTIMIZATION")?,
6659 Action::Apply { apply_type } => f.write_fmt(format_args!("APPLY {0}", apply_type))write!(f, "APPLY {apply_type}")?,
6660 Action::ApplyBudget => f.write_str("APPLYBUDGET")?,
6661 Action::AttachListing => f.write_str("ATTACH LISTING")?,
6662 Action::AttachPolicy => f.write_str("ATTACH POLICY")?,
6663 Action::Audit => f.write_str("AUDIT")?,
6664 Action::BindServiceEndpoint => f.write_str("BIND SERVICE ENDPOINT")?,
6665 Action::Connect => f.write_str("CONNECT")?,
6666 Action::Create { obj_type } => {
6667 f.write_str("CREATE")?;
6668 if let Some(obj_type) = obj_type {
6669 f.write_fmt(format_args!(" {0}", obj_type))write!(f, " {obj_type}")?
6670 }
6671 }
6672 Action::DatabaseRole { role } => f.write_fmt(format_args!("DATABASE ROLE {0}", role))write!(f, "DATABASE ROLE {role}")?,
6673 Action::Delete => f.write_str("DELETE")?,
6674 Action::Drop => f.write_str("DROP")?,
6675 Action::EvolveSchema => f.write_str("EVOLVE SCHEMA")?,
6676 Action::Exec { obj_type } => {
6677 f.write_str("EXEC")?;
6678 if let Some(obj_type) = obj_type {
6679 f.write_fmt(format_args!(" {0}", obj_type))write!(f, " {obj_type}")?
6680 }
6681 }
6682 Action::Execute { obj_type } => {
6683 f.write_str("EXECUTE")?;
6684 if let Some(obj_type) = obj_type {
6685 f.write_fmt(format_args!(" {0}", obj_type))write!(f, " {obj_type}")?
6686 }
6687 }
6688 Action::Failover => f.write_str("FAILOVER")?,
6689 Action::ImportedPrivileges => f.write_str("IMPORTED PRIVILEGES")?,
6690 Action::ImportShare => f.write_str("IMPORT SHARE")?,
6691 Action::Insert { .. } => f.write_str("INSERT")?,
6692 Action::Manage { manage_type } => f.write_fmt(format_args!("MANAGE {0}", manage_type))write!(f, "MANAGE {manage_type}")?,
6693 Action::ManageReleases => f.write_str("MANAGE RELEASES")?,
6694 Action::ManageVersions => f.write_str("MANAGE VERSIONS")?,
6695 Action::Modify { modify_type } => {
6696 f.write_fmt(format_args!("MODIFY"))write!(f, "MODIFY")?;
6697 if let Some(modify_type) = modify_type {
6698 f.write_fmt(format_args!(" {0}", modify_type))write!(f, " {modify_type}")?;
6699 }
6700 }
6701 Action::Monitor { monitor_type } => {
6702 f.write_fmt(format_args!("MONITOR"))write!(f, "MONITOR")?;
6703 if let Some(monitor_type) = monitor_type {
6704 f.write_fmt(format_args!(" {0}", monitor_type))write!(f, " {monitor_type}")?
6705 }
6706 }
6707 Action::Operate => f.write_str("OPERATE")?,
6708 Action::OverrideShareRestrictions => f.write_str("OVERRIDE SHARE RESTRICTIONS")?,
6709 Action::Ownership => f.write_str("OWNERSHIP")?,
6710 Action::PurchaseDataExchangeListing => f.write_str("PURCHASE DATA EXCHANGE LISTING")?,
6711 Action::Read => f.write_str("READ")?,
6712 Action::ReadSession => f.write_str("READ SESSION")?,
6713 Action::References { .. } => f.write_str("REFERENCES")?,
6714 Action::Replicate => f.write_str("REPLICATE")?,
6715 Action::ResolveAll => f.write_str("RESOLVE ALL")?,
6716 Action::Role { role } => f.write_fmt(format_args!("ROLE {0}", role))write!(f, "ROLE {role}")?,
6717 Action::Select { .. } => f.write_str("SELECT")?,
6718 Action::Temporary => f.write_str("TEMPORARY")?,
6719 Action::Trigger => f.write_str("TRIGGER")?,
6720 Action::Truncate => f.write_str("TRUNCATE")?,
6721 Action::Update { .. } => f.write_str("UPDATE")?,
6722 Action::Usage => f.write_str("USAGE")?,
6723 };
6724 match self {
6725 Action::Insert { columns }
6726 | Action::References { columns }
6727 | Action::Select { columns }
6728 | Action::Update { columns } => {
6729 if let Some(columns) = columns {
6730 f.write_fmt(format_args!(" ({0})", display_comma_separated(columns)))write!(f, " ({})", display_comma_separated(columns))?;
6731 }
6732 }
6733 _ => (),
6734 };
6735 Ok(())
6736 }
6737}
6738
6739#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ActionCreateObjectType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ActionCreateObjectType::Account => "Account",
ActionCreateObjectType::Application => "Application",
ActionCreateObjectType::ApplicationPackage =>
"ApplicationPackage",
ActionCreateObjectType::ComputePool => "ComputePool",
ActionCreateObjectType::DataExchangeListing =>
"DataExchangeListing",
ActionCreateObjectType::Database => "Database",
ActionCreateObjectType::ExternalVolume => "ExternalVolume",
ActionCreateObjectType::FailoverGroup => "FailoverGroup",
ActionCreateObjectType::Integration => "Integration",
ActionCreateObjectType::NetworkPolicy => "NetworkPolicy",
ActionCreateObjectType::OrganiationListing =>
"OrganiationListing",
ActionCreateObjectType::ReplicationGroup =>
"ReplicationGroup",
ActionCreateObjectType::Role => "Role",
ActionCreateObjectType::Schema => "Schema",
ActionCreateObjectType::Share => "Share",
ActionCreateObjectType::User => "User",
ActionCreateObjectType::Warehouse => "Warehouse",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ActionCreateObjectType {
#[inline]
fn clone(&self) -> ActionCreateObjectType {
match self {
ActionCreateObjectType::Account =>
ActionCreateObjectType::Account,
ActionCreateObjectType::Application =>
ActionCreateObjectType::Application,
ActionCreateObjectType::ApplicationPackage =>
ActionCreateObjectType::ApplicationPackage,
ActionCreateObjectType::ComputePool =>
ActionCreateObjectType::ComputePool,
ActionCreateObjectType::DataExchangeListing =>
ActionCreateObjectType::DataExchangeListing,
ActionCreateObjectType::Database =>
ActionCreateObjectType::Database,
ActionCreateObjectType::ExternalVolume =>
ActionCreateObjectType::ExternalVolume,
ActionCreateObjectType::FailoverGroup =>
ActionCreateObjectType::FailoverGroup,
ActionCreateObjectType::Integration =>
ActionCreateObjectType::Integration,
ActionCreateObjectType::NetworkPolicy =>
ActionCreateObjectType::NetworkPolicy,
ActionCreateObjectType::OrganiationListing =>
ActionCreateObjectType::OrganiationListing,
ActionCreateObjectType::ReplicationGroup =>
ActionCreateObjectType::ReplicationGroup,
ActionCreateObjectType::Role => ActionCreateObjectType::Role,
ActionCreateObjectType::Schema => ActionCreateObjectType::Schema,
ActionCreateObjectType::Share => ActionCreateObjectType::Share,
ActionCreateObjectType::User => ActionCreateObjectType::User,
ActionCreateObjectType::Warehouse =>
ActionCreateObjectType::Warehouse,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ActionCreateObjectType {
#[inline]
fn eq(&self, other: &ActionCreateObjectType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ActionCreateObjectType {
#[inline]
fn partial_cmp(&self, other: &ActionCreateObjectType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ActionCreateObjectType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ActionCreateObjectType {
#[inline]
fn cmp(&self, other: &ActionCreateObjectType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ActionCreateObjectType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6741#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ActionCreateObjectType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Account => {}
Self::Application => {}
Self::ApplicationPackage => {}
Self::ComputePool => {}
Self::DataExchangeListing => {}
Self::Database => {}
Self::ExternalVolume => {}
Self::FailoverGroup => {}
Self::Integration => {}
Self::NetworkPolicy => {}
Self::OrganiationListing => {}
Self::ReplicationGroup => {}
Self::Role => {}
Self::Schema => {}
Self::Share => {}
Self::User => {}
Self::Warehouse => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ActionCreateObjectType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Account => {}
Self::Application => {}
Self::ApplicationPackage => {}
Self::ComputePool => {}
Self::DataExchangeListing => {}
Self::Database => {}
Self::ExternalVolume => {}
Self::FailoverGroup => {}
Self::Integration => {}
Self::NetworkPolicy => {}
Self::OrganiationListing => {}
Self::ReplicationGroup => {}
Self::Role => {}
Self::Schema => {}
Self::Share => {}
Self::User => {}
Self::Warehouse => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6742pub enum ActionCreateObjectType {
6745 Account,
6746 Application,
6747 ApplicationPackage,
6748 ComputePool,
6749 DataExchangeListing,
6750 Database,
6751 ExternalVolume,
6752 FailoverGroup,
6753 Integration,
6754 NetworkPolicy,
6755 OrganiationListing,
6756 ReplicationGroup,
6757 Role,
6758 Schema,
6759 Share,
6760 User,
6761 Warehouse,
6762}
6763
6764impl fmt::Display for ActionCreateObjectType {
6765 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6766 match self {
6767 ActionCreateObjectType::Account => f.write_fmt(format_args!("ACCOUNT"))write!(f, "ACCOUNT"),
6768 ActionCreateObjectType::Application => f.write_fmt(format_args!("APPLICATION"))write!(f, "APPLICATION"),
6769 ActionCreateObjectType::ApplicationPackage => f.write_fmt(format_args!("APPLICATION PACKAGE"))write!(f, "APPLICATION PACKAGE"),
6770 ActionCreateObjectType::ComputePool => f.write_fmt(format_args!("COMPUTE POOL"))write!(f, "COMPUTE POOL"),
6771 ActionCreateObjectType::DataExchangeListing => f.write_fmt(format_args!("DATA EXCHANGE LISTING"))write!(f, "DATA EXCHANGE LISTING"),
6772 ActionCreateObjectType::Database => f.write_fmt(format_args!("DATABASE"))write!(f, "DATABASE"),
6773 ActionCreateObjectType::ExternalVolume => f.write_fmt(format_args!("EXTERNAL VOLUME"))write!(f, "EXTERNAL VOLUME"),
6774 ActionCreateObjectType::FailoverGroup => f.write_fmt(format_args!("FAILOVER GROUP"))write!(f, "FAILOVER GROUP"),
6775 ActionCreateObjectType::Integration => f.write_fmt(format_args!("INTEGRATION"))write!(f, "INTEGRATION"),
6776 ActionCreateObjectType::NetworkPolicy => f.write_fmt(format_args!("NETWORK POLICY"))write!(f, "NETWORK POLICY"),
6777 ActionCreateObjectType::OrganiationListing => f.write_fmt(format_args!("ORGANIZATION LISTING"))write!(f, "ORGANIZATION LISTING"),
6778 ActionCreateObjectType::ReplicationGroup => f.write_fmt(format_args!("REPLICATION GROUP"))write!(f, "REPLICATION GROUP"),
6779 ActionCreateObjectType::Role => f.write_fmt(format_args!("ROLE"))write!(f, "ROLE"),
6780 ActionCreateObjectType::Schema => f.write_fmt(format_args!("SCHEMA"))write!(f, "SCHEMA"),
6781 ActionCreateObjectType::Share => f.write_fmt(format_args!("SHARE"))write!(f, "SHARE"),
6782 ActionCreateObjectType::User => f.write_fmt(format_args!("USER"))write!(f, "USER"),
6783 ActionCreateObjectType::Warehouse => f.write_fmt(format_args!("WAREHOUSE"))write!(f, "WAREHOUSE"),
6784 }
6785 }
6786}
6787
6788#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ActionApplyType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ActionApplyType::AggregationPolicy => "AggregationPolicy",
ActionApplyType::AuthenticationPolicy =>
"AuthenticationPolicy",
ActionApplyType::JoinPolicy => "JoinPolicy",
ActionApplyType::MaskingPolicy => "MaskingPolicy",
ActionApplyType::PackagesPolicy => "PackagesPolicy",
ActionApplyType::PasswordPolicy => "PasswordPolicy",
ActionApplyType::ProjectionPolicy => "ProjectionPolicy",
ActionApplyType::RowAccessPolicy => "RowAccessPolicy",
ActionApplyType::SessionPolicy => "SessionPolicy",
ActionApplyType::Tag => "Tag",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ActionApplyType {
#[inline]
fn clone(&self) -> ActionApplyType {
match self {
ActionApplyType::AggregationPolicy =>
ActionApplyType::AggregationPolicy,
ActionApplyType::AuthenticationPolicy =>
ActionApplyType::AuthenticationPolicy,
ActionApplyType::JoinPolicy => ActionApplyType::JoinPolicy,
ActionApplyType::MaskingPolicy => ActionApplyType::MaskingPolicy,
ActionApplyType::PackagesPolicy =>
ActionApplyType::PackagesPolicy,
ActionApplyType::PasswordPolicy =>
ActionApplyType::PasswordPolicy,
ActionApplyType::ProjectionPolicy =>
ActionApplyType::ProjectionPolicy,
ActionApplyType::RowAccessPolicy =>
ActionApplyType::RowAccessPolicy,
ActionApplyType::SessionPolicy => ActionApplyType::SessionPolicy,
ActionApplyType::Tag => ActionApplyType::Tag,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ActionApplyType {
#[inline]
fn eq(&self, other: &ActionApplyType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ActionApplyType {
#[inline]
fn partial_cmp(&self, other: &ActionApplyType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ActionApplyType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ActionApplyType {
#[inline]
fn cmp(&self, other: &ActionApplyType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ActionApplyType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6790#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ActionApplyType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AggregationPolicy => {}
Self::AuthenticationPolicy => {}
Self::JoinPolicy => {}
Self::MaskingPolicy => {}
Self::PackagesPolicy => {}
Self::PasswordPolicy => {}
Self::ProjectionPolicy => {}
Self::RowAccessPolicy => {}
Self::SessionPolicy => {}
Self::Tag => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ActionApplyType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AggregationPolicy => {}
Self::AuthenticationPolicy => {}
Self::JoinPolicy => {}
Self::MaskingPolicy => {}
Self::PackagesPolicy => {}
Self::PasswordPolicy => {}
Self::ProjectionPolicy => {}
Self::RowAccessPolicy => {}
Self::SessionPolicy => {}
Self::Tag => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6791pub enum ActionApplyType {
6794 AggregationPolicy,
6795 AuthenticationPolicy,
6796 JoinPolicy,
6797 MaskingPolicy,
6798 PackagesPolicy,
6799 PasswordPolicy,
6800 ProjectionPolicy,
6801 RowAccessPolicy,
6802 SessionPolicy,
6803 Tag,
6804}
6805
6806impl fmt::Display for ActionApplyType {
6807 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6808 match self {
6809 ActionApplyType::AggregationPolicy => f.write_fmt(format_args!("AGGREGATION POLICY"))write!(f, "AGGREGATION POLICY"),
6810 ActionApplyType::AuthenticationPolicy => f.write_fmt(format_args!("AUTHENTICATION POLICY"))write!(f, "AUTHENTICATION POLICY"),
6811 ActionApplyType::JoinPolicy => f.write_fmt(format_args!("JOIN POLICY"))write!(f, "JOIN POLICY"),
6812 ActionApplyType::MaskingPolicy => f.write_fmt(format_args!("MASKING POLICY"))write!(f, "MASKING POLICY"),
6813 ActionApplyType::PackagesPolicy => f.write_fmt(format_args!("PACKAGES POLICY"))write!(f, "PACKAGES POLICY"),
6814 ActionApplyType::PasswordPolicy => f.write_fmt(format_args!("PASSWORD POLICY"))write!(f, "PASSWORD POLICY"),
6815 ActionApplyType::ProjectionPolicy => f.write_fmt(format_args!("PROJECTION POLICY"))write!(f, "PROJECTION POLICY"),
6816 ActionApplyType::RowAccessPolicy => f.write_fmt(format_args!("ROW ACCESS POLICY"))write!(f, "ROW ACCESS POLICY"),
6817 ActionApplyType::SessionPolicy => f.write_fmt(format_args!("SESSION POLICY"))write!(f, "SESSION POLICY"),
6818 ActionApplyType::Tag => f.write_fmt(format_args!("TAG"))write!(f, "TAG"),
6819 }
6820 }
6821}
6822
6823#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ActionExecuteObjectType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ActionExecuteObjectType::Alert => "Alert",
ActionExecuteObjectType::DataMetricFunction =>
"DataMetricFunction",
ActionExecuteObjectType::ManagedAlert => "ManagedAlert",
ActionExecuteObjectType::ManagedTask => "ManagedTask",
ActionExecuteObjectType::Task => "Task",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ActionExecuteObjectType {
#[inline]
fn clone(&self) -> ActionExecuteObjectType {
match self {
ActionExecuteObjectType::Alert => ActionExecuteObjectType::Alert,
ActionExecuteObjectType::DataMetricFunction =>
ActionExecuteObjectType::DataMetricFunction,
ActionExecuteObjectType::ManagedAlert =>
ActionExecuteObjectType::ManagedAlert,
ActionExecuteObjectType::ManagedTask =>
ActionExecuteObjectType::ManagedTask,
ActionExecuteObjectType::Task => ActionExecuteObjectType::Task,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ActionExecuteObjectType {
#[inline]
fn eq(&self, other: &ActionExecuteObjectType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ActionExecuteObjectType {
#[inline]
fn partial_cmp(&self, other: &ActionExecuteObjectType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ActionExecuteObjectType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ActionExecuteObjectType {
#[inline]
fn cmp(&self, other: &ActionExecuteObjectType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ActionExecuteObjectType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6825#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ActionExecuteObjectType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Alert => {}
Self::DataMetricFunction => {}
Self::ManagedAlert => {}
Self::ManagedTask => {}
Self::Task => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ActionExecuteObjectType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Alert => {}
Self::DataMetricFunction => {}
Self::ManagedAlert => {}
Self::ManagedTask => {}
Self::Task => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6826pub enum ActionExecuteObjectType {
6829 Alert,
6830 DataMetricFunction,
6831 ManagedAlert,
6832 ManagedTask,
6833 Task,
6834}
6835
6836impl fmt::Display for ActionExecuteObjectType {
6837 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6838 match self {
6839 ActionExecuteObjectType::Alert => f.write_fmt(format_args!("ALERT"))write!(f, "ALERT"),
6840 ActionExecuteObjectType::DataMetricFunction => f.write_fmt(format_args!("DATA METRIC FUNCTION"))write!(f, "DATA METRIC FUNCTION"),
6841 ActionExecuteObjectType::ManagedAlert => f.write_fmt(format_args!("MANAGED ALERT"))write!(f, "MANAGED ALERT"),
6842 ActionExecuteObjectType::ManagedTask => f.write_fmt(format_args!("MANAGED TASK"))write!(f, "MANAGED TASK"),
6843 ActionExecuteObjectType::Task => f.write_fmt(format_args!("TASK"))write!(f, "TASK"),
6844 }
6845 }
6846}
6847
6848#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ActionManageType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ActionManageType::AccountSupportCases =>
"AccountSupportCases",
ActionManageType::EventSharing => "EventSharing",
ActionManageType::Grants => "Grants",
ActionManageType::ListingAutoFulfillment =>
"ListingAutoFulfillment",
ActionManageType::OrganizationSupportCases =>
"OrganizationSupportCases",
ActionManageType::UserSupportCases => "UserSupportCases",
ActionManageType::Warehouses => "Warehouses",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ActionManageType {
#[inline]
fn clone(&self) -> ActionManageType {
match self {
ActionManageType::AccountSupportCases =>
ActionManageType::AccountSupportCases,
ActionManageType::EventSharing => ActionManageType::EventSharing,
ActionManageType::Grants => ActionManageType::Grants,
ActionManageType::ListingAutoFulfillment =>
ActionManageType::ListingAutoFulfillment,
ActionManageType::OrganizationSupportCases =>
ActionManageType::OrganizationSupportCases,
ActionManageType::UserSupportCases =>
ActionManageType::UserSupportCases,
ActionManageType::Warehouses => ActionManageType::Warehouses,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ActionManageType {
#[inline]
fn eq(&self, other: &ActionManageType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ActionManageType {
#[inline]
fn partial_cmp(&self, other: &ActionManageType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ActionManageType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ActionManageType {
#[inline]
fn cmp(&self, other: &ActionManageType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ActionManageType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6850#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ActionManageType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AccountSupportCases => {}
Self::EventSharing => {}
Self::Grants => {}
Self::ListingAutoFulfillment => {}
Self::OrganizationSupportCases => {}
Self::UserSupportCases => {}
Self::Warehouses => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ActionManageType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AccountSupportCases => {}
Self::EventSharing => {}
Self::Grants => {}
Self::ListingAutoFulfillment => {}
Self::OrganizationSupportCases => {}
Self::UserSupportCases => {}
Self::Warehouses => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6851pub enum ActionManageType {
6854 AccountSupportCases,
6855 EventSharing,
6856 Grants,
6857 ListingAutoFulfillment,
6858 OrganizationSupportCases,
6859 UserSupportCases,
6860 Warehouses,
6861}
6862
6863impl fmt::Display for ActionManageType {
6864 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6865 match self {
6866 ActionManageType::AccountSupportCases => f.write_fmt(format_args!("ACCOUNT SUPPORT CASES"))write!(f, "ACCOUNT SUPPORT CASES"),
6867 ActionManageType::EventSharing => f.write_fmt(format_args!("EVENT SHARING"))write!(f, "EVENT SHARING"),
6868 ActionManageType::Grants => f.write_fmt(format_args!("GRANTS"))write!(f, "GRANTS"),
6869 ActionManageType::ListingAutoFulfillment => f.write_fmt(format_args!("LISTING AUTO FULFILLMENT"))write!(f, "LISTING AUTO FULFILLMENT"),
6870 ActionManageType::OrganizationSupportCases => f.write_fmt(format_args!("ORGANIZATION SUPPORT CASES"))write!(f, "ORGANIZATION SUPPORT CASES"),
6871 ActionManageType::UserSupportCases => f.write_fmt(format_args!("USER SUPPORT CASES"))write!(f, "USER SUPPORT CASES"),
6872 ActionManageType::Warehouses => f.write_fmt(format_args!("WAREHOUSES"))write!(f, "WAREHOUSES"),
6873 }
6874 }
6875}
6876
6877#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ActionModifyType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ActionModifyType::LogLevel => "LogLevel",
ActionModifyType::TraceLevel => "TraceLevel",
ActionModifyType::SessionLogLevel => "SessionLogLevel",
ActionModifyType::SessionTraceLevel => "SessionTraceLevel",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ActionModifyType {
#[inline]
fn clone(&self) -> ActionModifyType {
match self {
ActionModifyType::LogLevel => ActionModifyType::LogLevel,
ActionModifyType::TraceLevel => ActionModifyType::TraceLevel,
ActionModifyType::SessionLogLevel =>
ActionModifyType::SessionLogLevel,
ActionModifyType::SessionTraceLevel =>
ActionModifyType::SessionTraceLevel,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ActionModifyType {
#[inline]
fn eq(&self, other: &ActionModifyType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ActionModifyType {
#[inline]
fn partial_cmp(&self, other: &ActionModifyType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ActionModifyType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ActionModifyType {
#[inline]
fn cmp(&self, other: &ActionModifyType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ActionModifyType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6879#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ActionModifyType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::LogLevel => {}
Self::TraceLevel => {}
Self::SessionLogLevel => {}
Self::SessionTraceLevel => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ActionModifyType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::LogLevel => {}
Self::TraceLevel => {}
Self::SessionLogLevel => {}
Self::SessionTraceLevel => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6880pub enum ActionModifyType {
6883 LogLevel,
6884 TraceLevel,
6885 SessionLogLevel,
6886 SessionTraceLevel,
6887}
6888
6889impl fmt::Display for ActionModifyType {
6890 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6891 match self {
6892 ActionModifyType::LogLevel => f.write_fmt(format_args!("LOG LEVEL"))write!(f, "LOG LEVEL"),
6893 ActionModifyType::TraceLevel => f.write_fmt(format_args!("TRACE LEVEL"))write!(f, "TRACE LEVEL"),
6894 ActionModifyType::SessionLogLevel => f.write_fmt(format_args!("SESSION LOG LEVEL"))write!(f, "SESSION LOG LEVEL"),
6895 ActionModifyType::SessionTraceLevel => f.write_fmt(format_args!("SESSION TRACE LEVEL"))write!(f, "SESSION TRACE LEVEL"),
6896 }
6897 }
6898}
6899
6900#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ActionMonitorType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ActionMonitorType::Execution => "Execution",
ActionMonitorType::Security => "Security",
ActionMonitorType::Usage => "Usage",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ActionMonitorType {
#[inline]
fn clone(&self) -> ActionMonitorType {
match self {
ActionMonitorType::Execution => ActionMonitorType::Execution,
ActionMonitorType::Security => ActionMonitorType::Security,
ActionMonitorType::Usage => ActionMonitorType::Usage,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ActionMonitorType {
#[inline]
fn eq(&self, other: &ActionMonitorType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ActionMonitorType {
#[inline]
fn partial_cmp(&self, other: &ActionMonitorType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ActionMonitorType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ActionMonitorType {
#[inline]
fn cmp(&self, other: &ActionMonitorType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ActionMonitorType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6902#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ActionMonitorType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Execution => {}
Self::Security => {}
Self::Usage => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ActionMonitorType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Execution => {}
Self::Security => {}
Self::Usage => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6903pub enum ActionMonitorType {
6906 Execution,
6907 Security,
6908 Usage,
6909}
6910
6911impl fmt::Display for ActionMonitorType {
6912 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6913 match self {
6914 ActionMonitorType::Execution => f.write_fmt(format_args!("EXECUTION"))write!(f, "EXECUTION"),
6915 ActionMonitorType::Security => f.write_fmt(format_args!("SECURITY"))write!(f, "SECURITY"),
6916 ActionMonitorType::Usage => f.write_fmt(format_args!("USAGE"))write!(f, "USAGE"),
6917 }
6918 }
6919}
6920
6921#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Grantee {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "Grantee",
"grantee_type", &self.grantee_type, "name", &&self.name)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Grantee {
#[inline]
fn clone(&self) -> Grantee {
Grantee {
grantee_type: ::core::clone::Clone::clone(&self.grantee_type),
name: ::core::clone::Clone::clone(&self.name),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Grantee {
#[inline]
fn eq(&self, other: &Grantee) -> bool {
self.grantee_type == other.grantee_type && self.name == other.name
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Grantee {
#[inline]
fn partial_cmp(&self, other: &Grantee)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.grantee_type,
&other.grantee_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Grantee {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<GranteesType>;
let _: ::core::cmp::AssertParamIsEq<Option<GranteeName>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Grantee {
#[inline]
fn cmp(&self, other: &Grantee) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.grantee_type, &other.grantee_type) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.name, &other.name),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Grantee {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.grantee_type, state);
::core::hash::Hash::hash(&self.name, state)
}
}Hash)]
6923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6924#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Grantee {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.grantee_type, visitor)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Grantee {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.grantee_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6925pub struct Grantee {
6926 pub grantee_type: GranteesType,
6927 pub name: Option<GranteeName>,
6928}
6929
6930impl fmt::Display for Grantee {
6931 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6932 match self.grantee_type {
6933 GranteesType::Role => {
6934 f.write_fmt(format_args!("ROLE "))write!(f, "ROLE ")?;
6935 }
6936 GranteesType::Share => {
6937 f.write_fmt(format_args!("SHARE "))write!(f, "SHARE ")?;
6938 }
6939 GranteesType::User => {
6940 f.write_fmt(format_args!("USER "))write!(f, "USER ")?;
6941 }
6942 GranteesType::Group => {
6943 f.write_fmt(format_args!("GROUP "))write!(f, "GROUP ")?;
6944 }
6945 GranteesType::Public => {
6946 f.write_fmt(format_args!("PUBLIC "))write!(f, "PUBLIC ")?;
6947 }
6948 GranteesType::DatabaseRole => {
6949 f.write_fmt(format_args!("DATABASE ROLE "))write!(f, "DATABASE ROLE ")?;
6950 }
6951 GranteesType::Application => {
6952 f.write_fmt(format_args!("APPLICATION "))write!(f, "APPLICATION ")?;
6953 }
6954 GranteesType::ApplicationRole => {
6955 f.write_fmt(format_args!("APPLICATION ROLE "))write!(f, "APPLICATION ROLE ")?;
6956 }
6957 GranteesType::None => (),
6958 }
6959 if let Some(ref name) = self.name {
6960 name.fmt(f)?;
6961 }
6962 Ok(())
6963 }
6964}
6965
6966#[derive(#[automatically_derived]
impl ::core::fmt::Debug for GranteesType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
GranteesType::Role => "Role",
GranteesType::Share => "Share",
GranteesType::User => "User",
GranteesType::Group => "Group",
GranteesType::Public => "Public",
GranteesType::DatabaseRole => "DatabaseRole",
GranteesType::Application => "Application",
GranteesType::ApplicationRole => "ApplicationRole",
GranteesType::None => "None",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for GranteesType {
#[inline]
fn clone(&self) -> GranteesType {
match self {
GranteesType::Role => GranteesType::Role,
GranteesType::Share => GranteesType::Share,
GranteesType::User => GranteesType::User,
GranteesType::Group => GranteesType::Group,
GranteesType::Public => GranteesType::Public,
GranteesType::DatabaseRole => GranteesType::DatabaseRole,
GranteesType::Application => GranteesType::Application,
GranteesType::ApplicationRole => GranteesType::ApplicationRole,
GranteesType::None => GranteesType::None,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for GranteesType {
#[inline]
fn eq(&self, other: &GranteesType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for GranteesType {
#[inline]
fn partial_cmp(&self, other: &GranteesType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for GranteesType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for GranteesType {
#[inline]
fn cmp(&self, other: &GranteesType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for GranteesType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
6967#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6968#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for GranteesType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Role => {}
Self::Share => {}
Self::User => {}
Self::Group => {}
Self::Public => {}
Self::DatabaseRole => {}
Self::Application => {}
Self::ApplicationRole => {}
Self::None => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for GranteesType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Role => {}
Self::Share => {}
Self::User => {}
Self::Group => {}
Self::Public => {}
Self::DatabaseRole => {}
Self::Application => {}
Self::ApplicationRole => {}
Self::None => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6969pub enum GranteesType {
6970 Role,
6971 Share,
6972 User,
6973 Group,
6974 Public,
6975 DatabaseRole,
6976 Application,
6977 ApplicationRole,
6978 None,
6979}
6980
6981#[derive(#[automatically_derived]
impl ::core::fmt::Debug for GranteeName {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
GranteeName::ObjectName(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ObjectName", &__self_0),
GranteeName::UserHost { user: __self_0, host: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"UserHost", "user", __self_0, "host", &__self_1),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for GranteeName {
#[inline]
fn clone(&self) -> GranteeName {
match self {
GranteeName::ObjectName(__self_0) =>
GranteeName::ObjectName(::core::clone::Clone::clone(__self_0)),
GranteeName::UserHost { user: __self_0, host: __self_1 } =>
GranteeName::UserHost {
user: ::core::clone::Clone::clone(__self_0),
host: ::core::clone::Clone::clone(__self_1),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for GranteeName {
#[inline]
fn eq(&self, other: &GranteeName) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(GranteeName::ObjectName(__self_0),
GranteeName::ObjectName(__arg1_0)) => __self_0 == __arg1_0,
(GranteeName::UserHost { user: __self_0, host: __self_1 },
GranteeName::UserHost { user: __arg1_0, host: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for GranteeName {
#[inline]
fn partial_cmp(&self, other: &GranteeName)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(GranteeName::ObjectName(__self_0),
GranteeName::ObjectName(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GranteeName::UserHost { user: __self_0, host: __self_1 },
GranteeName::UserHost { user: __arg1_0, host: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for GranteeName {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for GranteeName {
#[inline]
fn cmp(&self, other: &GranteeName) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(GranteeName::ObjectName(__self_0),
GranteeName::ObjectName(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GranteeName::UserHost { user: __self_0, host: __self_1 },
GranteeName::UserHost { user: __arg1_0, host: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for GranteeName {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
GranteeName::ObjectName(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GranteeName::UserHost { user: __self_0, host: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
}
}
}Hash)]
6983#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6984#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for GranteeName {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ObjectName(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::UserHost { user, host } => {
sqlparser::ast::Visit::visit(user, visitor)?;
sqlparser::ast::Visit::visit(host, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for GranteeName {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ObjectName(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::UserHost { user, host } => {
sqlparser::ast::VisitMut::visit(user, visitor)?;
sqlparser::ast::VisitMut::visit(host, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
6985pub enum GranteeName {
6986 ObjectName(ObjectName),
6988 UserHost { user: Ident, host: Ident },
6990}
6991
6992impl fmt::Display for GranteeName {
6993 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
6994 match self {
6995 GranteeName::ObjectName(name) => name.fmt(f),
6996 GranteeName::UserHost { user, host } => {
6997 f.write_fmt(format_args!("{0}@{1}", user, host))write!(f, "{user}@{host}")
6998 }
6999 }
7000 }
7001}
7002
7003#[derive(#[automatically_derived]
impl ::core::fmt::Debug for GrantObjects {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
GrantObjects::AllSequencesInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"AllSequencesInSchema", "schemas", &__self_0),
GrantObjects::AllTablesInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"AllTablesInSchema", "schemas", &__self_0),
GrantObjects::AllViewsInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"AllViewsInSchema", "schemas", &__self_0),
GrantObjects::AllMaterializedViewsInSchema { schemas: __self_0 }
=>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"AllMaterializedViewsInSchema", "schemas", &__self_0),
GrantObjects::AllExternalTablesInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"AllExternalTablesInSchema", "schemas", &__self_0),
GrantObjects::AllFunctionsInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"AllFunctionsInSchema", "schemas", &__self_0),
GrantObjects::FutureSchemasInDatabase { databases: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FutureSchemasInDatabase", "databases", &__self_0),
GrantObjects::FutureTablesInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FutureTablesInSchema", "schemas", &__self_0),
GrantObjects::FutureViewsInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FutureViewsInSchema", "schemas", &__self_0),
GrantObjects::FutureExternalTablesInSchema { schemas: __self_0 }
=>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FutureExternalTablesInSchema", "schemas", &__self_0),
GrantObjects::FutureMaterializedViewsInSchema { schemas: __self_0
} =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FutureMaterializedViewsInSchema", "schemas", &__self_0),
GrantObjects::FutureSequencesInSchema { schemas: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FutureSequencesInSchema", "schemas", &__self_0),
GrantObjects::Databases(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Databases", &__self_0),
GrantObjects::Schemas(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Schemas", &__self_0),
GrantObjects::Sequences(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Sequences", &__self_0),
GrantObjects::Tables(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tables",
&__self_0),
GrantObjects::Views(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Views",
&__self_0),
GrantObjects::Warehouses(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Warehouses", &__self_0),
GrantObjects::Integrations(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Integrations", &__self_0),
GrantObjects::ResourceMonitors(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ResourceMonitors", &__self_0),
GrantObjects::Users(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Users",
&__self_0),
GrantObjects::ComputePools(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ComputePools", &__self_0),
GrantObjects::Connections(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Connections", &__self_0),
GrantObjects::FailoverGroup(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"FailoverGroup", &__self_0),
GrantObjects::ReplicationGroup(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ReplicationGroup", &__self_0),
GrantObjects::ExternalVolumes(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ExternalVolumes", &__self_0),
GrantObjects::Procedure { name: __self_0, arg_types: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Procedure", "name", __self_0, "arg_types", &__self_1),
GrantObjects::Function { name: __self_0, arg_types: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Function", "name", __self_0, "arg_types", &__self_1),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for GrantObjects {
#[inline]
fn clone(&self) -> GrantObjects {
match self {
GrantObjects::AllSequencesInSchema { schemas: __self_0 } =>
GrantObjects::AllSequencesInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::AllTablesInSchema { schemas: __self_0 } =>
GrantObjects::AllTablesInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::AllViewsInSchema { schemas: __self_0 } =>
GrantObjects::AllViewsInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::AllMaterializedViewsInSchema { schemas: __self_0 }
=>
GrantObjects::AllMaterializedViewsInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::AllExternalTablesInSchema { schemas: __self_0 } =>
GrantObjects::AllExternalTablesInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::AllFunctionsInSchema { schemas: __self_0 } =>
GrantObjects::AllFunctionsInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::FutureSchemasInDatabase { databases: __self_0 } =>
GrantObjects::FutureSchemasInDatabase {
databases: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::FutureTablesInSchema { schemas: __self_0 } =>
GrantObjects::FutureTablesInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::FutureViewsInSchema { schemas: __self_0 } =>
GrantObjects::FutureViewsInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::FutureExternalTablesInSchema { schemas: __self_0 }
=>
GrantObjects::FutureExternalTablesInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::FutureMaterializedViewsInSchema { schemas: __self_0
} =>
GrantObjects::FutureMaterializedViewsInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::FutureSequencesInSchema { schemas: __self_0 } =>
GrantObjects::FutureSequencesInSchema {
schemas: ::core::clone::Clone::clone(__self_0),
},
GrantObjects::Databases(__self_0) =>
GrantObjects::Databases(::core::clone::Clone::clone(__self_0)),
GrantObjects::Schemas(__self_0) =>
GrantObjects::Schemas(::core::clone::Clone::clone(__self_0)),
GrantObjects::Sequences(__self_0) =>
GrantObjects::Sequences(::core::clone::Clone::clone(__self_0)),
GrantObjects::Tables(__self_0) =>
GrantObjects::Tables(::core::clone::Clone::clone(__self_0)),
GrantObjects::Views(__self_0) =>
GrantObjects::Views(::core::clone::Clone::clone(__self_0)),
GrantObjects::Warehouses(__self_0) =>
GrantObjects::Warehouses(::core::clone::Clone::clone(__self_0)),
GrantObjects::Integrations(__self_0) =>
GrantObjects::Integrations(::core::clone::Clone::clone(__self_0)),
GrantObjects::ResourceMonitors(__self_0) =>
GrantObjects::ResourceMonitors(::core::clone::Clone::clone(__self_0)),
GrantObjects::Users(__self_0) =>
GrantObjects::Users(::core::clone::Clone::clone(__self_0)),
GrantObjects::ComputePools(__self_0) =>
GrantObjects::ComputePools(::core::clone::Clone::clone(__self_0)),
GrantObjects::Connections(__self_0) =>
GrantObjects::Connections(::core::clone::Clone::clone(__self_0)),
GrantObjects::FailoverGroup(__self_0) =>
GrantObjects::FailoverGroup(::core::clone::Clone::clone(__self_0)),
GrantObjects::ReplicationGroup(__self_0) =>
GrantObjects::ReplicationGroup(::core::clone::Clone::clone(__self_0)),
GrantObjects::ExternalVolumes(__self_0) =>
GrantObjects::ExternalVolumes(::core::clone::Clone::clone(__self_0)),
GrantObjects::Procedure { name: __self_0, arg_types: __self_1 } =>
GrantObjects::Procedure {
name: ::core::clone::Clone::clone(__self_0),
arg_types: ::core::clone::Clone::clone(__self_1),
},
GrantObjects::Function { name: __self_0, arg_types: __self_1 } =>
GrantObjects::Function {
name: ::core::clone::Clone::clone(__self_0),
arg_types: ::core::clone::Clone::clone(__self_1),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for GrantObjects {
#[inline]
fn eq(&self, other: &GrantObjects) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(GrantObjects::AllSequencesInSchema { schemas: __self_0 },
GrantObjects::AllSequencesInSchema { schemas: __arg1_0 }) =>
__self_0 == __arg1_0,
(GrantObjects::AllTablesInSchema { schemas: __self_0 },
GrantObjects::AllTablesInSchema { schemas: __arg1_0 }) =>
__self_0 == __arg1_0,
(GrantObjects::AllViewsInSchema { schemas: __self_0 },
GrantObjects::AllViewsInSchema { schemas: __arg1_0 }) =>
__self_0 == __arg1_0,
(GrantObjects::AllMaterializedViewsInSchema {
schemas: __self_0 },
GrantObjects::AllMaterializedViewsInSchema {
schemas: __arg1_0 }) => __self_0 == __arg1_0,
(GrantObjects::AllExternalTablesInSchema { schemas: __self_0
}, GrantObjects::AllExternalTablesInSchema {
schemas: __arg1_0 }) => __self_0 == __arg1_0,
(GrantObjects::AllFunctionsInSchema { schemas: __self_0 },
GrantObjects::AllFunctionsInSchema { schemas: __arg1_0 }) =>
__self_0 == __arg1_0,
(GrantObjects::FutureSchemasInDatabase { databases: __self_0
}, GrantObjects::FutureSchemasInDatabase {
databases: __arg1_0 }) => __self_0 == __arg1_0,
(GrantObjects::FutureTablesInSchema { schemas: __self_0 },
GrantObjects::FutureTablesInSchema { schemas: __arg1_0 }) =>
__self_0 == __arg1_0,
(GrantObjects::FutureViewsInSchema { schemas: __self_0 },
GrantObjects::FutureViewsInSchema { schemas: __arg1_0 }) =>
__self_0 == __arg1_0,
(GrantObjects::FutureExternalTablesInSchema {
schemas: __self_0 },
GrantObjects::FutureExternalTablesInSchema {
schemas: __arg1_0 }) => __self_0 == __arg1_0,
(GrantObjects::FutureMaterializedViewsInSchema {
schemas: __self_0 },
GrantObjects::FutureMaterializedViewsInSchema {
schemas: __arg1_0 }) => __self_0 == __arg1_0,
(GrantObjects::FutureSequencesInSchema { schemas: __self_0 },
GrantObjects::FutureSequencesInSchema { schemas: __arg1_0 })
=> __self_0 == __arg1_0,
(GrantObjects::Databases(__self_0),
GrantObjects::Databases(__arg1_0)) => __self_0 == __arg1_0,
(GrantObjects::Schemas(__self_0),
GrantObjects::Schemas(__arg1_0)) => __self_0 == __arg1_0,
(GrantObjects::Sequences(__self_0),
GrantObjects::Sequences(__arg1_0)) => __self_0 == __arg1_0,
(GrantObjects::Tables(__self_0),
GrantObjects::Tables(__arg1_0)) => __self_0 == __arg1_0,
(GrantObjects::Views(__self_0), GrantObjects::Views(__arg1_0))
=> __self_0 == __arg1_0,
(GrantObjects::Warehouses(__self_0),
GrantObjects::Warehouses(__arg1_0)) => __self_0 == __arg1_0,
(GrantObjects::Integrations(__self_0),
GrantObjects::Integrations(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::ResourceMonitors(__self_0),
GrantObjects::ResourceMonitors(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::Users(__self_0), GrantObjects::Users(__arg1_0))
=> __self_0 == __arg1_0,
(GrantObjects::ComputePools(__self_0),
GrantObjects::ComputePools(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::Connections(__self_0),
GrantObjects::Connections(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::FailoverGroup(__self_0),
GrantObjects::FailoverGroup(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::ReplicationGroup(__self_0),
GrantObjects::ReplicationGroup(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::ExternalVolumes(__self_0),
GrantObjects::ExternalVolumes(__arg1_0)) =>
__self_0 == __arg1_0,
(GrantObjects::Procedure { name: __self_0, arg_types: __self_1
}, GrantObjects::Procedure {
name: __arg1_0, arg_types: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(GrantObjects::Function { name: __self_0, arg_types: __self_1
}, GrantObjects::Function {
name: __arg1_0, arg_types: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for GrantObjects {
#[inline]
fn partial_cmp(&self, other: &GrantObjects)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(GrantObjects::AllSequencesInSchema { schemas: __self_0 },
GrantObjects::AllSequencesInSchema { schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::AllTablesInSchema { schemas: __self_0 },
GrantObjects::AllTablesInSchema { schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::AllViewsInSchema { schemas: __self_0 },
GrantObjects::AllViewsInSchema { schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::AllMaterializedViewsInSchema { schemas: __self_0 },
GrantObjects::AllMaterializedViewsInSchema { schemas: __arg1_0
}) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::AllExternalTablesInSchema { schemas: __self_0 },
GrantObjects::AllExternalTablesInSchema { schemas: __arg1_0 })
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::AllFunctionsInSchema { schemas: __self_0 },
GrantObjects::AllFunctionsInSchema { schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FutureSchemasInDatabase { databases: __self_0 },
GrantObjects::FutureSchemasInDatabase { databases: __arg1_0 })
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FutureTablesInSchema { schemas: __self_0 },
GrantObjects::FutureTablesInSchema { schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FutureViewsInSchema { schemas: __self_0 },
GrantObjects::FutureViewsInSchema { schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FutureExternalTablesInSchema { schemas: __self_0 },
GrantObjects::FutureExternalTablesInSchema { schemas: __arg1_0
}) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FutureMaterializedViewsInSchema { schemas: __self_0
}, GrantObjects::FutureMaterializedViewsInSchema {
schemas: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FutureSequencesInSchema { schemas: __self_0 },
GrantObjects::FutureSequencesInSchema { schemas: __arg1_0 })
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Databases(__self_0),
GrantObjects::Databases(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Schemas(__self_0), GrantObjects::Schemas(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Sequences(__self_0),
GrantObjects::Sequences(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Tables(__self_0), GrantObjects::Tables(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Views(__self_0), GrantObjects::Views(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Warehouses(__self_0),
GrantObjects::Warehouses(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Integrations(__self_0),
GrantObjects::Integrations(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::ResourceMonitors(__self_0),
GrantObjects::ResourceMonitors(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Users(__self_0), GrantObjects::Users(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::ComputePools(__self_0),
GrantObjects::ComputePools(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Connections(__self_0),
GrantObjects::Connections(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::FailoverGroup(__self_0),
GrantObjects::FailoverGroup(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::ReplicationGroup(__self_0),
GrantObjects::ReplicationGroup(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::ExternalVolumes(__self_0),
GrantObjects::ExternalVolumes(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(GrantObjects::Procedure { name: __self_0, arg_types: __self_1 },
GrantObjects::Procedure { name: __arg1_0, arg_types: __arg1_1
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(GrantObjects::Function { name: __self_0, arg_types: __self_1 },
GrantObjects::Function { name: __arg1_0, arg_types: __arg1_1
}) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for GrantObjects {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for GrantObjects {
#[inline]
fn cmp(&self, other: &GrantObjects) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(GrantObjects::AllSequencesInSchema { schemas: __self_0 },
GrantObjects::AllSequencesInSchema { schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::AllTablesInSchema { schemas: __self_0 },
GrantObjects::AllTablesInSchema { schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::AllViewsInSchema { schemas: __self_0 },
GrantObjects::AllViewsInSchema { schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::AllMaterializedViewsInSchema {
schemas: __self_0 },
GrantObjects::AllMaterializedViewsInSchema {
schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::AllExternalTablesInSchema { schemas: __self_0
}, GrantObjects::AllExternalTablesInSchema {
schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::AllFunctionsInSchema { schemas: __self_0 },
GrantObjects::AllFunctionsInSchema { schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FutureSchemasInDatabase { databases: __self_0
}, GrantObjects::FutureSchemasInDatabase {
databases: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FutureTablesInSchema { schemas: __self_0 },
GrantObjects::FutureTablesInSchema { schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FutureViewsInSchema { schemas: __self_0 },
GrantObjects::FutureViewsInSchema { schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FutureExternalTablesInSchema {
schemas: __self_0 },
GrantObjects::FutureExternalTablesInSchema {
schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FutureMaterializedViewsInSchema {
schemas: __self_0 },
GrantObjects::FutureMaterializedViewsInSchema {
schemas: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FutureSequencesInSchema { schemas: __self_0
}, GrantObjects::FutureSequencesInSchema { schemas: __arg1_0
}) => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Databases(__self_0),
GrantObjects::Databases(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Schemas(__self_0),
GrantObjects::Schemas(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Sequences(__self_0),
GrantObjects::Sequences(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Tables(__self_0),
GrantObjects::Tables(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Views(__self_0),
GrantObjects::Views(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Warehouses(__self_0),
GrantObjects::Warehouses(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Integrations(__self_0),
GrantObjects::Integrations(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::ResourceMonitors(__self_0),
GrantObjects::ResourceMonitors(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Users(__self_0),
GrantObjects::Users(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::ComputePools(__self_0),
GrantObjects::ComputePools(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Connections(__self_0),
GrantObjects::Connections(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::FailoverGroup(__self_0),
GrantObjects::FailoverGroup(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::ReplicationGroup(__self_0),
GrantObjects::ReplicationGroup(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::ExternalVolumes(__self_0),
GrantObjects::ExternalVolumes(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(GrantObjects::Procedure {
name: __self_0, arg_types: __self_1 },
GrantObjects::Procedure {
name: __arg1_0, arg_types: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(GrantObjects::Function {
name: __self_0, arg_types: __self_1 },
GrantObjects::Function { name: __arg1_0, arg_types: __arg1_1
}) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for GrantObjects {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
GrantObjects::AllSequencesInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::AllTablesInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::AllViewsInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::AllMaterializedViewsInSchema { schemas: __self_0 }
=> ::core::hash::Hash::hash(__self_0, state),
GrantObjects::AllExternalTablesInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::AllFunctionsInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::FutureSchemasInDatabase { databases: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::FutureTablesInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::FutureViewsInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::FutureExternalTablesInSchema { schemas: __self_0 }
=> ::core::hash::Hash::hash(__self_0, state),
GrantObjects::FutureMaterializedViewsInSchema { schemas: __self_0
} => ::core::hash::Hash::hash(__self_0, state),
GrantObjects::FutureSequencesInSchema { schemas: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Databases(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Schemas(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Sequences(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Tables(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Views(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Warehouses(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Integrations(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::ResourceMonitors(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Users(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::ComputePools(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Connections(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::FailoverGroup(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::ReplicationGroup(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::ExternalVolumes(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
GrantObjects::Procedure { name: __self_0, arg_types: __self_1 } =>
{
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
GrantObjects::Function { name: __self_0, arg_types: __self_1 } =>
{
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
}
}
}Hash)]
7005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7006#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for GrantObjects {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AllSequencesInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::AllTablesInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::AllViewsInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::AllMaterializedViewsInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::AllExternalTablesInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::AllFunctionsInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::FutureSchemasInDatabase { databases } => {
sqlparser::ast::Visit::visit(databases, visitor)?;
}
Self::FutureTablesInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::FutureViewsInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::FutureExternalTablesInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::FutureMaterializedViewsInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::FutureSequencesInSchema { schemas } => {
sqlparser::ast::Visit::visit(schemas, visitor)?;
}
Self::Databases(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Schemas(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Sequences(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Tables(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Views(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Warehouses(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Integrations(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ResourceMonitors(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Users(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::ComputePools(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Connections(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::FailoverGroup(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ReplicationGroup(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ExternalVolumes(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Procedure { name, arg_types } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(arg_types, visitor)?;
}
Self::Function { name, arg_types } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(arg_types, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for GrantObjects {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AllSequencesInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::AllTablesInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::AllViewsInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::AllMaterializedViewsInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::AllExternalTablesInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::AllFunctionsInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::FutureSchemasInDatabase { databases } => {
sqlparser::ast::VisitMut::visit(databases, visitor)?;
}
Self::FutureTablesInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::FutureViewsInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::FutureExternalTablesInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::FutureMaterializedViewsInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::FutureSequencesInSchema { schemas } => {
sqlparser::ast::VisitMut::visit(schemas, visitor)?;
}
Self::Databases(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Schemas(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Sequences(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Tables(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Views(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Warehouses(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Integrations(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ResourceMonitors(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Users(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ComputePools(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Connections(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::FailoverGroup(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ReplicationGroup(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ExternalVolumes(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Procedure { name, arg_types } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(arg_types, visitor)?;
}
Self::Function { name, arg_types } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(arg_types, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7007pub enum GrantObjects {
7008 AllSequencesInSchema { schemas: Vec<ObjectName> },
7010 AllTablesInSchema { schemas: Vec<ObjectName> },
7012 AllViewsInSchema { schemas: Vec<ObjectName> },
7014 AllMaterializedViewsInSchema { schemas: Vec<ObjectName> },
7016 AllExternalTablesInSchema { schemas: Vec<ObjectName> },
7018 AllFunctionsInSchema { schemas: Vec<ObjectName> },
7020 FutureSchemasInDatabase { databases: Vec<ObjectName> },
7022 FutureTablesInSchema { schemas: Vec<ObjectName> },
7024 FutureViewsInSchema { schemas: Vec<ObjectName> },
7026 FutureExternalTablesInSchema { schemas: Vec<ObjectName> },
7028 FutureMaterializedViewsInSchema { schemas: Vec<ObjectName> },
7030 FutureSequencesInSchema { schemas: Vec<ObjectName> },
7032 Databases(Vec<ObjectName>),
7034 Schemas(Vec<ObjectName>),
7036 Sequences(Vec<ObjectName>),
7038 Tables(Vec<ObjectName>),
7040 Views(Vec<ObjectName>),
7042 Warehouses(Vec<ObjectName>),
7044 Integrations(Vec<ObjectName>),
7046 ResourceMonitors(Vec<ObjectName>),
7048 Users(Vec<ObjectName>),
7050 ComputePools(Vec<ObjectName>),
7052 Connections(Vec<ObjectName>),
7054 FailoverGroup(Vec<ObjectName>),
7056 ReplicationGroup(Vec<ObjectName>),
7058 ExternalVolumes(Vec<ObjectName>),
7060 Procedure {
7066 name: ObjectName,
7067 arg_types: Vec<DataType>,
7068 },
7069
7070 Function {
7076 name: ObjectName,
7077 arg_types: Vec<DataType>,
7078 },
7079}
7080
7081impl fmt::Display for GrantObjects {
7082 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7083 match self {
7084 GrantObjects::Sequences(sequences) => {
7085 f.write_fmt(format_args!("SEQUENCE {0}", display_comma_separated(sequences)))write!(f, "SEQUENCE {}", display_comma_separated(sequences))
7086 }
7087 GrantObjects::Databases(databases) => {
7088 f.write_fmt(format_args!("DATABASE {0}", display_comma_separated(databases)))write!(f, "DATABASE {}", display_comma_separated(databases))
7089 }
7090 GrantObjects::Schemas(schemas) => {
7091 f.write_fmt(format_args!("SCHEMA {0}", display_comma_separated(schemas)))write!(f, "SCHEMA {}", display_comma_separated(schemas))
7092 }
7093 GrantObjects::Tables(tables) => {
7094 f.write_fmt(format_args!("{0}", display_comma_separated(tables)))write!(f, "{}", display_comma_separated(tables))
7095 }
7096 GrantObjects::Views(views) => {
7097 f.write_fmt(format_args!("VIEW {0}", display_comma_separated(views)))write!(f, "VIEW {}", display_comma_separated(views))
7098 }
7099 GrantObjects::Warehouses(warehouses) => {
7100 f.write_fmt(format_args!("WAREHOUSE {0}",
display_comma_separated(warehouses)))write!(f, "WAREHOUSE {}", display_comma_separated(warehouses))
7101 }
7102 GrantObjects::Integrations(integrations) => {
7103 f.write_fmt(format_args!("INTEGRATION {0}",
display_comma_separated(integrations)))write!(f, "INTEGRATION {}", display_comma_separated(integrations))
7104 }
7105 GrantObjects::AllSequencesInSchema { schemas } => {
7106 f.write_fmt(format_args!("ALL SEQUENCES IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7107 f,
7108 "ALL SEQUENCES IN SCHEMA {}",
7109 display_comma_separated(schemas)
7110 )
7111 }
7112 GrantObjects::AllTablesInSchema { schemas } => {
7113 f.write_fmt(format_args!("ALL TABLES IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7114 f,
7115 "ALL TABLES IN SCHEMA {}",
7116 display_comma_separated(schemas)
7117 )
7118 }
7119 GrantObjects::AllExternalTablesInSchema { schemas } => {
7120 f.write_fmt(format_args!("ALL EXTERNAL TABLES IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7121 f,
7122 "ALL EXTERNAL TABLES IN SCHEMA {}",
7123 display_comma_separated(schemas)
7124 )
7125 }
7126 GrantObjects::AllViewsInSchema { schemas } => {
7127 f.write_fmt(format_args!("ALL VIEWS IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7128 f,
7129 "ALL VIEWS IN SCHEMA {}",
7130 display_comma_separated(schemas)
7131 )
7132 }
7133 GrantObjects::AllMaterializedViewsInSchema { schemas } => {
7134 f.write_fmt(format_args!("ALL MATERIALIZED VIEWS IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7135 f,
7136 "ALL MATERIALIZED VIEWS IN SCHEMA {}",
7137 display_comma_separated(schemas)
7138 )
7139 }
7140 GrantObjects::AllFunctionsInSchema { schemas } => {
7141 f.write_fmt(format_args!("ALL FUNCTIONS IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7142 f,
7143 "ALL FUNCTIONS IN SCHEMA {}",
7144 display_comma_separated(schemas)
7145 )
7146 }
7147 GrantObjects::FutureSchemasInDatabase { databases } => {
7148 f.write_fmt(format_args!("FUTURE SCHEMAS IN DATABASE {0}",
display_comma_separated(databases)))write!(
7149 f,
7150 "FUTURE SCHEMAS IN DATABASE {}",
7151 display_comma_separated(databases)
7152 )
7153 }
7154 GrantObjects::FutureTablesInSchema { schemas } => {
7155 f.write_fmt(format_args!("FUTURE TABLES IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7156 f,
7157 "FUTURE TABLES IN SCHEMA {}",
7158 display_comma_separated(schemas)
7159 )
7160 }
7161 GrantObjects::FutureExternalTablesInSchema { schemas } => {
7162 f.write_fmt(format_args!("FUTURE EXTERNAL TABLES IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7163 f,
7164 "FUTURE EXTERNAL TABLES IN SCHEMA {}",
7165 display_comma_separated(schemas)
7166 )
7167 }
7168 GrantObjects::FutureViewsInSchema { schemas } => {
7169 f.write_fmt(format_args!("FUTURE VIEWS IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7170 f,
7171 "FUTURE VIEWS IN SCHEMA {}",
7172 display_comma_separated(schemas)
7173 )
7174 }
7175 GrantObjects::FutureMaterializedViewsInSchema { schemas } => {
7176 f.write_fmt(format_args!("FUTURE MATERIALIZED VIEWS IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7177 f,
7178 "FUTURE MATERIALIZED VIEWS IN SCHEMA {}",
7179 display_comma_separated(schemas)
7180 )
7181 }
7182 GrantObjects::FutureSequencesInSchema { schemas } => {
7183 f.write_fmt(format_args!("FUTURE SEQUENCES IN SCHEMA {0}",
display_comma_separated(schemas)))write!(
7184 f,
7185 "FUTURE SEQUENCES IN SCHEMA {}",
7186 display_comma_separated(schemas)
7187 )
7188 }
7189 GrantObjects::ResourceMonitors(objects) => {
7190 f.write_fmt(format_args!("RESOURCE MONITOR {0}",
display_comma_separated(objects)))write!(f, "RESOURCE MONITOR {}", display_comma_separated(objects))
7191 }
7192 GrantObjects::Users(objects) => {
7193 f.write_fmt(format_args!("USER {0}", display_comma_separated(objects)))write!(f, "USER {}", display_comma_separated(objects))
7194 }
7195 GrantObjects::ComputePools(objects) => {
7196 f.write_fmt(format_args!("COMPUTE POOL {0}",
display_comma_separated(objects)))write!(f, "COMPUTE POOL {}", display_comma_separated(objects))
7197 }
7198 GrantObjects::Connections(objects) => {
7199 f.write_fmt(format_args!("CONNECTION {0}", display_comma_separated(objects)))write!(f, "CONNECTION {}", display_comma_separated(objects))
7200 }
7201 GrantObjects::FailoverGroup(objects) => {
7202 f.write_fmt(format_args!("FAILOVER GROUP {0}",
display_comma_separated(objects)))write!(f, "FAILOVER GROUP {}", display_comma_separated(objects))
7203 }
7204 GrantObjects::ReplicationGroup(objects) => {
7205 f.write_fmt(format_args!("REPLICATION GROUP {0}",
display_comma_separated(objects)))write!(f, "REPLICATION GROUP {}", display_comma_separated(objects))
7206 }
7207 GrantObjects::ExternalVolumes(objects) => {
7208 f.write_fmt(format_args!("EXTERNAL VOLUME {0}",
display_comma_separated(objects)))write!(f, "EXTERNAL VOLUME {}", display_comma_separated(objects))
7209 }
7210 GrantObjects::Procedure { name, arg_types } => {
7211 f.write_fmt(format_args!("PROCEDURE {0}", name))write!(f, "PROCEDURE {name}")?;
7212 if !arg_types.is_empty() {
7213 f.write_fmt(format_args!("({0})", display_comma_separated(arg_types)))write!(f, "({})", display_comma_separated(arg_types))?;
7214 }
7215 Ok(())
7216 }
7217 GrantObjects::Function { name, arg_types } => {
7218 f.write_fmt(format_args!("FUNCTION {0}", name))write!(f, "FUNCTION {name}")?;
7219 if !arg_types.is_empty() {
7220 f.write_fmt(format_args!("({0})", display_comma_separated(arg_types)))write!(f, "({})", display_comma_separated(arg_types))?;
7221 }
7222 Ok(())
7223 }
7224 }
7225 }
7226}
7227
7228#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DenyStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field5_finish(f, "DenyStatement",
"privileges", &self.privileges, "objects", &self.objects,
"grantees", &self.grantees, "granted_by", &self.granted_by,
"cascade", &&self.cascade)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DenyStatement {
#[inline]
fn clone(&self) -> DenyStatement {
DenyStatement {
privileges: ::core::clone::Clone::clone(&self.privileges),
objects: ::core::clone::Clone::clone(&self.objects),
grantees: ::core::clone::Clone::clone(&self.grantees),
granted_by: ::core::clone::Clone::clone(&self.granted_by),
cascade: ::core::clone::Clone::clone(&self.cascade),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DenyStatement {
#[inline]
fn eq(&self, other: &DenyStatement) -> bool {
self.privileges == other.privileges && self.objects == other.objects
&& self.grantees == other.grantees &&
self.granted_by == other.granted_by &&
self.cascade == other.cascade
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DenyStatement {
#[inline]
fn partial_cmp(&self, other: &DenyStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.privileges,
&other.privileges) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.objects,
&other.objects) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.grantees,
&other.grantees) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.granted_by,
&other.granted_by) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.cascade,
&other.cascade),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DenyStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Privileges>;
let _: ::core::cmp::AssertParamIsEq<GrantObjects>;
let _: ::core::cmp::AssertParamIsEq<Vec<Grantee>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<CascadeOption>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DenyStatement {
#[inline]
fn cmp(&self, other: &DenyStatement) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.privileges, &other.privileges) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.objects, &other.objects) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.grantees, &other.grantees)
{
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.granted_by,
&other.granted_by) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.cascade, &other.cascade),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DenyStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.privileges, state);
::core::hash::Hash::hash(&self.objects, state);
::core::hash::Hash::hash(&self.grantees, state);
::core::hash::Hash::hash(&self.granted_by, state);
::core::hash::Hash::hash(&self.cascade, state)
}
}Hash)]
7232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7233#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DenyStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.privileges, visitor)?;
sqlparser::ast::Visit::visit(&self.objects, visitor)?;
sqlparser::ast::Visit::visit(&self.grantees, visitor)?;
sqlparser::ast::Visit::visit(&self.granted_by, visitor)?;
sqlparser::ast::Visit::visit(&self.cascade, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DenyStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.privileges, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.objects, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.grantees, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.granted_by, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.cascade, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7234pub struct DenyStatement {
7235 pub privileges: Privileges,
7236 pub objects: GrantObjects,
7237 pub grantees: Vec<Grantee>,
7238 pub granted_by: Option<Ident>,
7239 pub cascade: Option<CascadeOption>,
7240}
7241
7242impl fmt::Display for DenyStatement {
7243 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7244 f.write_fmt(format_args!("DENY {0}", self.privileges))write!(f, "DENY {}", self.privileges)?;
7245 f.write_fmt(format_args!(" ON {0}", self.objects))write!(f, " ON {}", self.objects)?;
7246 if !self.grantees.is_empty() {
7247 f.write_fmt(format_args!(" TO {0}", display_comma_separated(&self.grantees)))write!(f, " TO {}", display_comma_separated(&self.grantees))?;
7248 }
7249 if let Some(cascade) = &self.cascade {
7250 f.write_fmt(format_args!(" {0}", cascade))write!(f, " {cascade}")?;
7251 }
7252 if let Some(granted_by) = &self.granted_by {
7253 f.write_fmt(format_args!(" AS {0}", granted_by))write!(f, " AS {granted_by}")?;
7254 }
7255 Ok(())
7256 }
7257}
7258
7259#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Assignment {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "Assignment",
"target", &self.target, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Assignment {
#[inline]
fn clone(&self) -> Assignment {
Assignment {
target: ::core::clone::Clone::clone(&self.target),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Assignment {
#[inline]
fn eq(&self, other: &Assignment) -> bool {
self.target == other.target && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Assignment {
#[inline]
fn partial_cmp(&self, other: &Assignment)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.target,
&other.target) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Assignment {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<AssignmentTarget>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Assignment {
#[inline]
fn cmp(&self, other: &Assignment) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.target, &other.target) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Assignment {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.target, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
7261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7262#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Assignment {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.target, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Assignment {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.target, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7263pub struct Assignment {
7264 pub target: AssignmentTarget,
7265 pub value: Expr,
7266}
7267
7268impl fmt::Display for Assignment {
7269 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7270 f.write_fmt(format_args!("{0} = {1}", self.target, self.value))write!(f, "{} = {}", self.target, self.value)
7271 }
7272}
7273
7274#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AssignmentTarget {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
AssignmentTarget::ColumnName(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ColumnName", &__self_0),
AssignmentTarget::Tuple(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tuple",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AssignmentTarget {
#[inline]
fn clone(&self) -> AssignmentTarget {
match self {
AssignmentTarget::ColumnName(__self_0) =>
AssignmentTarget::ColumnName(::core::clone::Clone::clone(__self_0)),
AssignmentTarget::Tuple(__self_0) =>
AssignmentTarget::Tuple(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AssignmentTarget {
#[inline]
fn eq(&self, other: &AssignmentTarget) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(AssignmentTarget::ColumnName(__self_0),
AssignmentTarget::ColumnName(__arg1_0)) =>
__self_0 == __arg1_0,
(AssignmentTarget::Tuple(__self_0),
AssignmentTarget::Tuple(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AssignmentTarget {
#[inline]
fn partial_cmp(&self, other: &AssignmentTarget)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(AssignmentTarget::ColumnName(__self_0),
AssignmentTarget::ColumnName(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(AssignmentTarget::Tuple(__self_0),
AssignmentTarget::Tuple(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AssignmentTarget {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AssignmentTarget {
#[inline]
fn cmp(&self, other: &AssignmentTarget) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(AssignmentTarget::ColumnName(__self_0),
AssignmentTarget::ColumnName(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(AssignmentTarget::Tuple(__self_0),
AssignmentTarget::Tuple(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AssignmentTarget {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
AssignmentTarget::ColumnName(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
AssignmentTarget::Tuple(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
7278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7279#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AssignmentTarget {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ColumnName(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Tuple(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for AssignmentTarget {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ColumnName(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Tuple(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7280pub enum AssignmentTarget {
7281 ColumnName(ObjectName),
7283 Tuple(Vec<ObjectName>),
7285}
7286
7287impl fmt::Display for AssignmentTarget {
7288 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7289 match self {
7290 AssignmentTarget::ColumnName(column) => f.write_fmt(format_args!("{0}", column))write!(f, "{column}"),
7291 AssignmentTarget::Tuple(columns) => f.write_fmt(format_args!("({0})", display_comma_separated(columns)))write!(f, "({})", display_comma_separated(columns)),
7292 }
7293 }
7294}
7295
7296#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionArgExpr {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
FunctionArgExpr::Expr(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
&__self_0),
FunctionArgExpr::QualifiedWildcard(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"QualifiedWildcard", &__self_0),
FunctionArgExpr::Wildcard =>
::core::fmt::Formatter::write_str(f, "Wildcard"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionArgExpr {
#[inline]
fn clone(&self) -> FunctionArgExpr {
match self {
FunctionArgExpr::Expr(__self_0) =>
FunctionArgExpr::Expr(::core::clone::Clone::clone(__self_0)),
FunctionArgExpr::QualifiedWildcard(__self_0) =>
FunctionArgExpr::QualifiedWildcard(::core::clone::Clone::clone(__self_0)),
FunctionArgExpr::Wildcard => FunctionArgExpr::Wildcard,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionArgExpr {
#[inline]
fn eq(&self, other: &FunctionArgExpr) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(FunctionArgExpr::Expr(__self_0),
FunctionArgExpr::Expr(__arg1_0)) => __self_0 == __arg1_0,
(FunctionArgExpr::QualifiedWildcard(__self_0),
FunctionArgExpr::QualifiedWildcard(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionArgExpr {
#[inline]
fn partial_cmp(&self, other: &FunctionArgExpr)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(FunctionArgExpr::Expr(__self_0), FunctionArgExpr::Expr(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgExpr::QualifiedWildcard(__self_0),
FunctionArgExpr::QualifiedWildcard(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionArgExpr {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionArgExpr {
#[inline]
fn cmp(&self, other: &FunctionArgExpr) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(FunctionArgExpr::Expr(__self_0),
FunctionArgExpr::Expr(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgExpr::QualifiedWildcard(__self_0),
FunctionArgExpr::QualifiedWildcard(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionArgExpr {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
FunctionArgExpr::Expr(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgExpr::QualifiedWildcard(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
7297#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7298#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionArgExpr {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::QualifiedWildcard(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Wildcard => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionArgExpr {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::QualifiedWildcard(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Wildcard => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7299pub enum FunctionArgExpr {
7300 Expr(Expr),
7301 QualifiedWildcard(ObjectName),
7303 Wildcard,
7305}
7306
7307impl From<Expr> for FunctionArgExpr {
7308 fn from(wildcard_expr: Expr) -> Self {
7309 match wildcard_expr {
7310 Expr::QualifiedWildcard(prefix, _) => Self::QualifiedWildcard(prefix),
7311 Expr::Wildcard(_) => Self::Wildcard,
7312 expr => Self::Expr(expr),
7313 }
7314 }
7315}
7316
7317impl fmt::Display for FunctionArgExpr {
7318 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7319 match self {
7320 FunctionArgExpr::Expr(expr) => f.write_fmt(format_args!("{0}", expr))write!(f, "{expr}"),
7321 FunctionArgExpr::QualifiedWildcard(prefix) => f.write_fmt(format_args!("{0}.*", prefix))write!(f, "{prefix}.*"),
7322 FunctionArgExpr::Wildcard => f.write_str("*"),
7323 }
7324 }
7325}
7326
7327#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionArgOperator {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FunctionArgOperator::Equals => "Equals",
FunctionArgOperator::RightArrow => "RightArrow",
FunctionArgOperator::Assignment => "Assignment",
FunctionArgOperator::Colon => "Colon",
FunctionArgOperator::Value => "Value",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionArgOperator {
#[inline]
fn clone(&self) -> FunctionArgOperator {
match self {
FunctionArgOperator::Equals => FunctionArgOperator::Equals,
FunctionArgOperator::RightArrow =>
FunctionArgOperator::RightArrow,
FunctionArgOperator::Assignment =>
FunctionArgOperator::Assignment,
FunctionArgOperator::Colon => FunctionArgOperator::Colon,
FunctionArgOperator::Value => FunctionArgOperator::Value,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionArgOperator {
#[inline]
fn eq(&self, other: &FunctionArgOperator) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionArgOperator {
#[inline]
fn partial_cmp(&self, other: &FunctionArgOperator)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionArgOperator {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionArgOperator {
#[inline]
fn cmp(&self, other: &FunctionArgOperator) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionArgOperator {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7329#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionArgOperator {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Equals => {}
Self::RightArrow => {}
Self::Assignment => {}
Self::Colon => {}
Self::Value => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionArgOperator {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Equals => {}
Self::RightArrow => {}
Self::Assignment => {}
Self::Colon => {}
Self::Value => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7330pub enum FunctionArgOperator {
7332 Equals,
7334 RightArrow,
7336 Assignment,
7338 Colon,
7340 Value,
7342}
7343
7344impl fmt::Display for FunctionArgOperator {
7345 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7346 match self {
7347 FunctionArgOperator::Equals => f.write_str("="),
7348 FunctionArgOperator::RightArrow => f.write_str("=>"),
7349 FunctionArgOperator::Assignment => f.write_str(":="),
7350 FunctionArgOperator::Colon => f.write_str(":"),
7351 FunctionArgOperator::Value => f.write_str("VALUE"),
7352 }
7353 }
7354}
7355
7356#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionArg {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
FunctionArg::Named {
name: __self_0, arg: __self_1, operator: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f, "Named",
"name", __self_0, "arg", __self_1, "operator", &__self_2),
FunctionArg::ExprNamed {
name: __self_0, arg: __self_1, operator: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ExprNamed", "name", __self_0, "arg", __self_1, "operator",
&__self_2),
FunctionArg::Unnamed(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Unnamed", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionArg {
#[inline]
fn clone(&self) -> FunctionArg {
match self {
FunctionArg::Named {
name: __self_0, arg: __self_1, operator: __self_2 } =>
FunctionArg::Named {
name: ::core::clone::Clone::clone(__self_0),
arg: ::core::clone::Clone::clone(__self_1),
operator: ::core::clone::Clone::clone(__self_2),
},
FunctionArg::ExprNamed {
name: __self_0, arg: __self_1, operator: __self_2 } =>
FunctionArg::ExprNamed {
name: ::core::clone::Clone::clone(__self_0),
arg: ::core::clone::Clone::clone(__self_1),
operator: ::core::clone::Clone::clone(__self_2),
},
FunctionArg::Unnamed(__self_0) =>
FunctionArg::Unnamed(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionArg {
#[inline]
fn eq(&self, other: &FunctionArg) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(FunctionArg::Named {
name: __self_0, arg: __self_1, operator: __self_2 },
FunctionArg::Named {
name: __arg1_0, arg: __arg1_1, operator: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(FunctionArg::ExprNamed {
name: __self_0, arg: __self_1, operator: __self_2 },
FunctionArg::ExprNamed {
name: __arg1_0, arg: __arg1_1, operator: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(FunctionArg::Unnamed(__self_0),
FunctionArg::Unnamed(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionArg {
#[inline]
fn partial_cmp(&self, other: &FunctionArg)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(FunctionArg::Named {
name: __self_0, arg: __self_1, operator: __self_2 },
FunctionArg::Named {
name: __arg1_0, arg: __arg1_1, operator: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(FunctionArg::ExprNamed {
name: __self_0, arg: __self_1, operator: __self_2 },
FunctionArg::ExprNamed {
name: __arg1_0, arg: __arg1_1, operator: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(FunctionArg::Unnamed(__self_0), FunctionArg::Unnamed(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionArg {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<FunctionArgExpr>;
let _: ::core::cmp::AssertParamIsEq<FunctionArgOperator>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionArg {
#[inline]
fn cmp(&self, other: &FunctionArg) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(FunctionArg::Named {
name: __self_0, arg: __self_1, operator: __self_2 },
FunctionArg::Named {
name: __arg1_0, arg: __arg1_1, operator: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(FunctionArg::ExprNamed {
name: __self_0, arg: __self_1, operator: __self_2 },
FunctionArg::ExprNamed {
name: __arg1_0, arg: __arg1_1, operator: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(FunctionArg::Unnamed(__self_0),
FunctionArg::Unnamed(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionArg {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
FunctionArg::Named {
name: __self_0, arg: __self_1, operator: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
FunctionArg::ExprNamed {
name: __self_0, arg: __self_1, operator: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
FunctionArg::Unnamed(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
7357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7358#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionArg {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Named { name, arg, operator } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(arg, visitor)?;
sqlparser::ast::Visit::visit(operator, visitor)?;
}
Self::ExprNamed { name, arg, operator } => {
sqlparser::ast::Visit::visit(name, visitor)?;
sqlparser::ast::Visit::visit(arg, visitor)?;
sqlparser::ast::Visit::visit(operator, visitor)?;
}
Self::Unnamed(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionArg {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Named { name, arg, operator } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(arg, visitor)?;
sqlparser::ast::VisitMut::visit(operator, visitor)?;
}
Self::ExprNamed { name, arg, operator } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
sqlparser::ast::VisitMut::visit(arg, visitor)?;
sqlparser::ast::VisitMut::visit(operator, visitor)?;
}
Self::Unnamed(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7359pub enum FunctionArg {
7360 Named {
7364 name: Ident,
7365 arg: FunctionArgExpr,
7366 operator: FunctionArgOperator,
7367 },
7368 ExprNamed {
7372 name: Expr,
7373 arg: FunctionArgExpr,
7374 operator: FunctionArgOperator,
7375 },
7376 Unnamed(FunctionArgExpr),
7377}
7378
7379impl fmt::Display for FunctionArg {
7380 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7381 match self {
7382 FunctionArg::Named {
7383 name,
7384 arg,
7385 operator,
7386 } => f.write_fmt(format_args!("{0} {1} {2}", name, operator, arg))write!(f, "{name} {operator} {arg}"),
7387 FunctionArg::ExprNamed {
7388 name,
7389 arg,
7390 operator,
7391 } => f.write_fmt(format_args!("{0} {1} {2}", name, operator, arg))write!(f, "{name} {operator} {arg}"),
7392 FunctionArg::Unnamed(unnamed_arg) => f.write_fmt(format_args!("{0}", unnamed_arg))write!(f, "{unnamed_arg}"),
7393 }
7394 }
7395}
7396
7397#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CloseCursor {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CloseCursor::All => ::core::fmt::Formatter::write_str(f, "All"),
CloseCursor::Specific { name: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Specific", "name", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CloseCursor {
#[inline]
fn clone(&self) -> CloseCursor {
match self {
CloseCursor::All => CloseCursor::All,
CloseCursor::Specific { name: __self_0 } =>
CloseCursor::Specific {
name: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CloseCursor {
#[inline]
fn eq(&self, other: &CloseCursor) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CloseCursor::Specific { name: __self_0 },
CloseCursor::Specific { name: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CloseCursor {
#[inline]
fn partial_cmp(&self, other: &CloseCursor)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CloseCursor::Specific { name: __self_0 }, CloseCursor::Specific {
name: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CloseCursor {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CloseCursor {
#[inline]
fn cmp(&self, other: &CloseCursor) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CloseCursor::Specific { name: __self_0 },
CloseCursor::Specific { name: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CloseCursor {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CloseCursor::Specific { name: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
7398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7399#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CloseCursor {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::All => {}
Self::Specific { name } => {
sqlparser::ast::Visit::visit(name, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CloseCursor {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::All => {}
Self::Specific { name } => {
sqlparser::ast::VisitMut::visit(name, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7400pub enum CloseCursor {
7401 All,
7402 Specific { name: Ident },
7403}
7404
7405impl fmt::Display for CloseCursor {
7406 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7407 match self {
7408 CloseCursor::All => f.write_fmt(format_args!("ALL"))write!(f, "ALL"),
7409 CloseCursor::Specific { name } => f.write_fmt(format_args!("{0}", name))write!(f, "{name}"),
7410 }
7411 }
7412}
7413
7414#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropDomain {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "DropDomain",
"if_exists", &self.if_exists, "name", &self.name, "drop_behavior",
&&self.drop_behavior)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropDomain {
#[inline]
fn clone(&self) -> DropDomain {
DropDomain {
if_exists: ::core::clone::Clone::clone(&self.if_exists),
name: ::core::clone::Clone::clone(&self.name),
drop_behavior: ::core::clone::Clone::clone(&self.drop_behavior),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropDomain {
#[inline]
fn eq(&self, other: &DropDomain) -> bool {
self.if_exists == other.if_exists && self.name == other.name &&
self.drop_behavior == other.drop_behavior
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropDomain {
#[inline]
fn partial_cmp(&self, other: &DropDomain)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
&other.if_exists) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.name,
&other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.drop_behavior,
&other.drop_behavior),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropDomain {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropDomain {
#[inline]
fn cmp(&self, other: &DropDomain) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.drop_behavior,
&other.drop_behavior),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropDomain {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.if_exists, state);
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.drop_behavior, state)
}
}Hash)]
7416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7417#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropDomain {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.drop_behavior, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DropDomain {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.if_exists, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.drop_behavior, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7418pub struct DropDomain {
7419 pub if_exists: bool,
7421 pub name: ObjectName,
7423 pub drop_behavior: Option<DropBehavior>,
7425}
7426
7427#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TypedString {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "TypedString",
"data_type", &self.data_type, "value", &self.value,
"uses_odbc_syntax", &&self.uses_odbc_syntax)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TypedString {
#[inline]
fn clone(&self) -> TypedString {
TypedString {
data_type: ::core::clone::Clone::clone(&self.data_type),
value: ::core::clone::Clone::clone(&self.value),
uses_odbc_syntax: ::core::clone::Clone::clone(&self.uses_odbc_syntax),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TypedString {
#[inline]
fn eq(&self, other: &TypedString) -> bool {
self.uses_odbc_syntax == other.uses_odbc_syntax &&
self.data_type == other.data_type && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TypedString {
#[inline]
fn partial_cmp(&self, other: &TypedString)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
&other.data_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.uses_odbc_syntax,
&other.uses_odbc_syntax),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TypedString {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<DataType>;
let _: ::core::cmp::AssertParamIsEq<ValueWithSpan>;
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TypedString {
#[inline]
fn cmp(&self, other: &TypedString) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.value, &other.value) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.uses_odbc_syntax,
&other.uses_odbc_syntax),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TypedString {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.data_type, state);
::core::hash::Hash::hash(&self.value, state);
::core::hash::Hash::hash(&self.uses_odbc_syntax, state)
}
}Hash)]
7431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7432#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TypedString {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
sqlparser::ast::Visit::visit(&self.uses_odbc_syntax, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TypedString {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.data_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.uses_odbc_syntax, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7433pub struct TypedString {
7434 pub data_type: DataType,
7435 pub value: ValueWithSpan,
7438 pub uses_odbc_syntax: bool,
7449}
7450
7451impl fmt::Display for TypedString {
7452 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7453 let data_type = &self.data_type;
7454 let value = &self.value;
7455 match self.uses_odbc_syntax {
7456 false => {
7457 f.write_fmt(format_args!("{0}", data_type))write!(f, "{data_type}")?;
7458 f.write_fmt(format_args!(" {0}", value))write!(f, " {value}")
7459 }
7460 true => {
7461 let prefix = match data_type {
7462 DataType::Date => "d",
7463 DataType::Time(..) => "t",
7464 DataType::Timestamp(..) => "ts",
7465 _ => "?",
7466 };
7467 f.write_fmt(format_args!("{{{0} {1}}}", prefix, value))write!(f, "{{{prefix} {value}}}")
7468 }
7469 }
7470 }
7471}
7472
7473#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Function {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
let names: &'static _ =
&["name", "uses_odbc_syntax", "parameters", "args", "filter",
"null_treatment", "over", "within_group"];
let values: &[&dyn ::core::fmt::Debug] =
&[&self.name, &self.uses_odbc_syntax, &self.parameters,
&self.args, &self.filter, &self.null_treatment, &self.over,
&&self.within_group];
::core::fmt::Formatter::debug_struct_fields_finish(f, "Function",
names, values)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Function {
#[inline]
fn clone(&self) -> Function {
Function {
name: ::core::clone::Clone::clone(&self.name),
uses_odbc_syntax: ::core::clone::Clone::clone(&self.uses_odbc_syntax),
parameters: ::core::clone::Clone::clone(&self.parameters),
args: ::core::clone::Clone::clone(&self.args),
filter: ::core::clone::Clone::clone(&self.filter),
null_treatment: ::core::clone::Clone::clone(&self.null_treatment),
over: ::core::clone::Clone::clone(&self.over),
within_group: ::core::clone::Clone::clone(&self.within_group),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Function {
#[inline]
fn eq(&self, other: &Function) -> bool {
self.uses_odbc_syntax == other.uses_odbc_syntax &&
self.name == other.name &&
self.parameters == other.parameters &&
self.args == other.args && self.filter == other.filter &&
self.null_treatment == other.null_treatment &&
self.over == other.over &&
self.within_group == other.within_group
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Function {
#[inline]
fn partial_cmp(&self, other: &Function)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.uses_odbc_syntax,
&other.uses_odbc_syntax) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.parameters,
&other.parameters) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.args,
&other.args) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.filter,
&other.filter) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.null_treatment,
&other.null_treatment) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.over,
&other.over) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.within_group,
&other.within_group),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Function {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<FunctionArguments>;
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<Option<NullTreatment>>;
let _: ::core::cmp::AssertParamIsEq<Option<WindowType>>;
let _: ::core::cmp::AssertParamIsEq<Vec<OrderByExpr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Function {
#[inline]
fn cmp(&self, other: &Function) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.uses_odbc_syntax,
&other.uses_odbc_syntax) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.parameters,
&other.parameters) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.args, &other.args) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.filter, &other.filter) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.null_treatment,
&other.null_treatment) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.over, &other.over) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.within_group,
&other.within_group),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Function {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.uses_odbc_syntax, state);
::core::hash::Hash::hash(&self.parameters, state);
::core::hash::Hash::hash(&self.args, state);
::core::hash::Hash::hash(&self.filter, state);
::core::hash::Hash::hash(&self.null_treatment, state);
::core::hash::Hash::hash(&self.over, state);
::core::hash::Hash::hash(&self.within_group, state)
}
}Hash)]
7475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7476#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Function {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.uses_odbc_syntax, visitor)?;
sqlparser::ast::Visit::visit(&self.parameters, visitor)?;
sqlparser::ast::Visit::visit(&self.args, visitor)?;
sqlparser::ast::Visit::visit(&self.filter, visitor)?;
sqlparser::ast::Visit::visit(&self.null_treatment, visitor)?;
sqlparser::ast::Visit::visit(&self.over, visitor)?;
sqlparser::ast::Visit::visit(&self.within_group, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Function {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.uses_odbc_syntax, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.parameters, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.args, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.filter, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.null_treatment, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.over, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.within_group, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7477pub struct Function {
7478 pub name: ObjectName,
7479 pub uses_odbc_syntax: bool,
7488 pub parameters: FunctionArguments,
7498 pub args: FunctionArguments,
7501 pub filter: Option<Box<Expr>>,
7503 pub null_treatment: Option<NullTreatment>,
7512 pub over: Option<WindowType>,
7514 pub within_group: Vec<OrderByExpr>,
7522}
7523
7524impl fmt::Display for Function {
7525 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7526 if self.uses_odbc_syntax {
7527 f.write_fmt(format_args!("{{fn "))write!(f, "{{fn ")?;
7528 }
7529
7530 f.write_fmt(format_args!("{0}{1}{2}", self.name, self.parameters, self.args))write!(f, "{}{}{}", self.name, self.parameters, self.args)?;
7531
7532 if !self.within_group.is_empty() {
7533 f.write_fmt(format_args!(" WITHIN GROUP (ORDER BY {0})",
display_comma_separated(&self.within_group)))write!(
7534 f,
7535 " WITHIN GROUP (ORDER BY {})",
7536 display_comma_separated(&self.within_group)
7537 )?;
7538 }
7539
7540 if let Some(filter_cond) = &self.filter {
7541 f.write_fmt(format_args!(" FILTER (WHERE {0})", filter_cond))write!(f, " FILTER (WHERE {filter_cond})")?;
7542 }
7543
7544 if let Some(null_treatment) = &self.null_treatment {
7545 f.write_fmt(format_args!(" {0}", null_treatment))write!(f, " {null_treatment}")?;
7546 }
7547
7548 if let Some(o) = &self.over {
7549 f.write_str(" OVER ")?;
7550 o.fmt(f)?;
7551 }
7552
7553 if self.uses_odbc_syntax {
7554 f.write_fmt(format_args!("}}"))write!(f, "}}")?;
7555 }
7556
7557 Ok(())
7558 }
7559}
7560
7561#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionArguments {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
FunctionArguments::None =>
::core::fmt::Formatter::write_str(f, "None"),
FunctionArguments::Subquery(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Subquery", &__self_0),
FunctionArguments::List(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "List",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionArguments {
#[inline]
fn clone(&self) -> FunctionArguments {
match self {
FunctionArguments::None => FunctionArguments::None,
FunctionArguments::Subquery(__self_0) =>
FunctionArguments::Subquery(::core::clone::Clone::clone(__self_0)),
FunctionArguments::List(__self_0) =>
FunctionArguments::List(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionArguments {
#[inline]
fn eq(&self, other: &FunctionArguments) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(FunctionArguments::Subquery(__self_0),
FunctionArguments::Subquery(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArguments::List(__self_0),
FunctionArguments::List(__arg1_0)) => __self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionArguments {
#[inline]
fn partial_cmp(&self, other: &FunctionArguments)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(FunctionArguments::Subquery(__self_0),
FunctionArguments::Subquery(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArguments::List(__self_0),
FunctionArguments::List(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionArguments {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<FunctionArgumentList>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionArguments {
#[inline]
fn cmp(&self, other: &FunctionArguments) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(FunctionArguments::Subquery(__self_0),
FunctionArguments::Subquery(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArguments::List(__self_0),
FunctionArguments::List(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionArguments {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
FunctionArguments::Subquery(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArguments::List(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
7563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7564#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionArguments {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::None => {}
Self::Subquery(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::List(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionArguments {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::None => {}
Self::Subquery(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::List(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7565pub enum FunctionArguments {
7566 None,
7569 Subquery(Box<Query>),
7572 List(FunctionArgumentList),
7575}
7576
7577impl fmt::Display for FunctionArguments {
7578 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7579 match self {
7580 FunctionArguments::None => Ok(()),
7581 FunctionArguments::Subquery(query) => f.write_fmt(format_args!("({0})", query))write!(f, "({query})"),
7582 FunctionArguments::List(args) => f.write_fmt(format_args!("({0})", args))write!(f, "({args})"),
7583 }
7584 }
7585}
7586
7587#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionArgumentList {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"FunctionArgumentList", "duplicate_treatment",
&self.duplicate_treatment, "args", &self.args, "clauses",
&&self.clauses)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionArgumentList {
#[inline]
fn clone(&self) -> FunctionArgumentList {
FunctionArgumentList {
duplicate_treatment: ::core::clone::Clone::clone(&self.duplicate_treatment),
args: ::core::clone::Clone::clone(&self.args),
clauses: ::core::clone::Clone::clone(&self.clauses),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionArgumentList {
#[inline]
fn eq(&self, other: &FunctionArgumentList) -> bool {
self.duplicate_treatment == other.duplicate_treatment &&
self.args == other.args && self.clauses == other.clauses
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionArgumentList {
#[inline]
fn partial_cmp(&self, other: &FunctionArgumentList)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.duplicate_treatment,
&other.duplicate_treatment) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.args,
&other.args) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.clauses,
&other.clauses),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionArgumentList {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<DuplicateTreatment>>;
let _: ::core::cmp::AssertParamIsEq<Vec<FunctionArg>>;
let _: ::core::cmp::AssertParamIsEq<Vec<FunctionArgumentClause>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionArgumentList {
#[inline]
fn cmp(&self, other: &FunctionArgumentList) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.duplicate_treatment,
&other.duplicate_treatment) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.args, &other.args) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.clauses, &other.clauses),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionArgumentList {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.duplicate_treatment, state);
::core::hash::Hash::hash(&self.args, state);
::core::hash::Hash::hash(&self.clauses, state)
}
}Hash)]
7589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7590#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionArgumentList {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.duplicate_treatment, visitor)?;
sqlparser::ast::Visit::visit(&self.args, visitor)?;
sqlparser::ast::Visit::visit(&self.clauses, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionArgumentList {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.duplicate_treatment,
visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.args, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.clauses, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7591pub struct FunctionArgumentList {
7592 pub duplicate_treatment: Option<DuplicateTreatment>,
7594 pub args: Vec<FunctionArg>,
7596 pub clauses: Vec<FunctionArgumentClause>,
7598}
7599
7600impl fmt::Display for FunctionArgumentList {
7601 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7602 if let Some(duplicate_treatment) = self.duplicate_treatment {
7603 f.write_fmt(format_args!("{0} ", duplicate_treatment))write!(f, "{duplicate_treatment} ")?;
7604 }
7605 f.write_fmt(format_args!("{0}", display_comma_separated(&self.args)))write!(f, "{}", display_comma_separated(&self.args))?;
7606 if !self.clauses.is_empty() {
7607 if !self.args.is_empty() {
7608 f.write_fmt(format_args!(" "))write!(f, " ")?;
7609 }
7610 f.write_fmt(format_args!("{0}", display_separated(&self.clauses, " ")))write!(f, "{}", display_separated(&self.clauses, " "))?;
7611 }
7612 Ok(())
7613 }
7614}
7615
7616#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionArgumentClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
FunctionArgumentClause::IgnoreOrRespectNulls(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IgnoreOrRespectNulls", &__self_0),
FunctionArgumentClause::OrderBy(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"OrderBy", &__self_0),
FunctionArgumentClause::Limit(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Limit",
&__self_0),
FunctionArgumentClause::OnOverflow(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"OnOverflow", &__self_0),
FunctionArgumentClause::Having(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Having",
&__self_0),
FunctionArgumentClause::Separator(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Separator", &__self_0),
FunctionArgumentClause::JsonNullClause(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"JsonNullClause", &__self_0),
FunctionArgumentClause::JsonReturningClause(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"JsonReturningClause", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionArgumentClause {
#[inline]
fn clone(&self) -> FunctionArgumentClause {
match self {
FunctionArgumentClause::IgnoreOrRespectNulls(__self_0) =>
FunctionArgumentClause::IgnoreOrRespectNulls(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::OrderBy(__self_0) =>
FunctionArgumentClause::OrderBy(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::Limit(__self_0) =>
FunctionArgumentClause::Limit(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::OnOverflow(__self_0) =>
FunctionArgumentClause::OnOverflow(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::Having(__self_0) =>
FunctionArgumentClause::Having(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::Separator(__self_0) =>
FunctionArgumentClause::Separator(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::JsonNullClause(__self_0) =>
FunctionArgumentClause::JsonNullClause(::core::clone::Clone::clone(__self_0)),
FunctionArgumentClause::JsonReturningClause(__self_0) =>
FunctionArgumentClause::JsonReturningClause(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionArgumentClause {
#[inline]
fn eq(&self, other: &FunctionArgumentClause) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(FunctionArgumentClause::IgnoreOrRespectNulls(__self_0),
FunctionArgumentClause::IgnoreOrRespectNulls(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::OrderBy(__self_0),
FunctionArgumentClause::OrderBy(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::Limit(__self_0),
FunctionArgumentClause::Limit(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::OnOverflow(__self_0),
FunctionArgumentClause::OnOverflow(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::Having(__self_0),
FunctionArgumentClause::Having(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::Separator(__self_0),
FunctionArgumentClause::Separator(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::JsonNullClause(__self_0),
FunctionArgumentClause::JsonNullClause(__arg1_0)) =>
__self_0 == __arg1_0,
(FunctionArgumentClause::JsonReturningClause(__self_0),
FunctionArgumentClause::JsonReturningClause(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionArgumentClause {
#[inline]
fn partial_cmp(&self, other: &FunctionArgumentClause)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(FunctionArgumentClause::IgnoreOrRespectNulls(__self_0),
FunctionArgumentClause::IgnoreOrRespectNulls(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::OrderBy(__self_0),
FunctionArgumentClause::OrderBy(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::Limit(__self_0),
FunctionArgumentClause::Limit(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::OnOverflow(__self_0),
FunctionArgumentClause::OnOverflow(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::Having(__self_0),
FunctionArgumentClause::Having(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::Separator(__self_0),
FunctionArgumentClause::Separator(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::JsonNullClause(__self_0),
FunctionArgumentClause::JsonNullClause(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(FunctionArgumentClause::JsonReturningClause(__self_0),
FunctionArgumentClause::JsonReturningClause(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionArgumentClause {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<NullTreatment>;
let _: ::core::cmp::AssertParamIsEq<Vec<OrderByExpr>>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<ListAggOnOverflow>;
let _: ::core::cmp::AssertParamIsEq<HavingBound>;
let _: ::core::cmp::AssertParamIsEq<Value>;
let _: ::core::cmp::AssertParamIsEq<JsonNullClause>;
let _: ::core::cmp::AssertParamIsEq<JsonReturningClause>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionArgumentClause {
#[inline]
fn cmp(&self, other: &FunctionArgumentClause) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(FunctionArgumentClause::IgnoreOrRespectNulls(__self_0),
FunctionArgumentClause::IgnoreOrRespectNulls(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::OrderBy(__self_0),
FunctionArgumentClause::OrderBy(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::Limit(__self_0),
FunctionArgumentClause::Limit(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::OnOverflow(__self_0),
FunctionArgumentClause::OnOverflow(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::Having(__self_0),
FunctionArgumentClause::Having(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::Separator(__self_0),
FunctionArgumentClause::Separator(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::JsonNullClause(__self_0),
FunctionArgumentClause::JsonNullClause(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(FunctionArgumentClause::JsonReturningClause(__self_0),
FunctionArgumentClause::JsonReturningClause(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionArgumentClause {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
FunctionArgumentClause::IgnoreOrRespectNulls(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::OrderBy(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::Limit(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::OnOverflow(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::Having(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::Separator(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::JsonNullClause(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
FunctionArgumentClause::JsonReturningClause(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
7617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7618#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionArgumentClause {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IgnoreOrRespectNulls(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::OrderBy(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Limit(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::OnOverflow(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Having(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Separator(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::JsonNullClause(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::JsonReturningClause(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionArgumentClause {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IgnoreOrRespectNulls(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::OrderBy(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Limit(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::OnOverflow(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Having(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Separator(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::JsonNullClause(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::JsonReturningClause(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7619pub enum FunctionArgumentClause {
7620 IgnoreOrRespectNulls(NullTreatment),
7629 OrderBy(Vec<OrderByExpr>),
7633 Limit(Expr),
7635 OnOverflow(ListAggOnOverflow),
7639 Having(HavingBound),
7648 Separator(Value),
7652 JsonNullClause(JsonNullClause),
7658 JsonReturningClause(JsonReturningClause),
7662}
7663
7664impl fmt::Display for FunctionArgumentClause {
7665 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7666 match self {
7667 FunctionArgumentClause::IgnoreOrRespectNulls(null_treatment) => {
7668 f.write_fmt(format_args!("{0}", null_treatment))write!(f, "{null_treatment}")
7669 }
7670 FunctionArgumentClause::OrderBy(order_by) => {
7671 f.write_fmt(format_args!("ORDER BY {0}", display_comma_separated(order_by)))write!(f, "ORDER BY {}", display_comma_separated(order_by))
7672 }
7673 FunctionArgumentClause::Limit(limit) => f.write_fmt(format_args!("LIMIT {0}", limit))write!(f, "LIMIT {limit}"),
7674 FunctionArgumentClause::OnOverflow(on_overflow) => f.write_fmt(format_args!("{0}", on_overflow))write!(f, "{on_overflow}"),
7675 FunctionArgumentClause::Having(bound) => f.write_fmt(format_args!("{0}", bound))write!(f, "{bound}"),
7676 FunctionArgumentClause::Separator(sep) => f.write_fmt(format_args!("SEPARATOR {0}", sep))write!(f, "SEPARATOR {sep}"),
7677 FunctionArgumentClause::JsonNullClause(null_clause) => f.write_fmt(format_args!("{0}", null_clause))write!(f, "{null_clause}"),
7678 FunctionArgumentClause::JsonReturningClause(returning_clause) => {
7679 f.write_fmt(format_args!("{0}", returning_clause))write!(f, "{returning_clause}")
7680 }
7681 }
7682 }
7683}
7684
7685#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Method {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "Method",
"expr", &self.expr, "method_chain", &&self.method_chain)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Method {
#[inline]
fn clone(&self) -> Method {
Method {
expr: ::core::clone::Clone::clone(&self.expr),
method_chain: ::core::clone::Clone::clone(&self.method_chain),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Method {
#[inline]
fn eq(&self, other: &Method) -> bool {
self.expr == other.expr && self.method_chain == other.method_chain
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Method {
#[inline]
fn partial_cmp(&self, other: &Method)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.expr, &other.expr) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.method_chain,
&other.method_chain),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Method {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Function>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Method {
#[inline]
fn cmp(&self, other: &Method) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.expr, &other.expr) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.method_chain,
&other.method_chain),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Method {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.expr, state);
::core::hash::Hash::hash(&self.method_chain, state)
}
}Hash)]
7687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7688#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Method {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.expr, visitor)?;
sqlparser::ast::Visit::visit(&self.method_chain, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Method {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.expr, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.method_chain, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7689pub struct Method {
7690 pub expr: Box<Expr>,
7691 pub method_chain: Vec<Function>,
7693}
7694
7695impl fmt::Display for Method {
7696 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7697 f.write_fmt(format_args!("{0}.{1}", self.expr,
display_separated(&self.method_chain, ".")))write!(
7698 f,
7699 "{}.{}",
7700 self.expr,
7701 display_separated(&self.method_chain, ".")
7702 )
7703 }
7704}
7705
7706#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DuplicateTreatment {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
DuplicateTreatment::Distinct => "Distinct",
DuplicateTreatment::All => "All",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for DuplicateTreatment { }Copy, #[automatically_derived]
impl ::core::clone::Clone for DuplicateTreatment {
#[inline]
fn clone(&self) -> DuplicateTreatment { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DuplicateTreatment {
#[inline]
fn eq(&self, other: &DuplicateTreatment) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DuplicateTreatment {
#[inline]
fn partial_cmp(&self, other: &DuplicateTreatment)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DuplicateTreatment {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DuplicateTreatment {
#[inline]
fn cmp(&self, other: &DuplicateTreatment) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DuplicateTreatment {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7708#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DuplicateTreatment {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Distinct => {} Self::All => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DuplicateTreatment {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Distinct => {} Self::All => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7709pub enum DuplicateTreatment {
7710 Distinct,
7712 All,
7714}
7715
7716impl fmt::Display for DuplicateTreatment {
7717 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7718 match self {
7719 DuplicateTreatment::Distinct => f.write_fmt(format_args!("DISTINCT"))write!(f, "DISTINCT"),
7720 DuplicateTreatment::All => f.write_fmt(format_args!("ALL"))write!(f, "ALL"),
7721 }
7722 }
7723}
7724
7725#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AnalyzeFormatKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
AnalyzeFormatKind::Keyword(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Keyword", &__self_0),
AnalyzeFormatKind::Assignment(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Assignment", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for AnalyzeFormatKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for AnalyzeFormatKind {
#[inline]
fn clone(&self) -> AnalyzeFormatKind {
let _: ::core::clone::AssertParamIsClone<AnalyzeFormat>;
*self
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AnalyzeFormatKind {
#[inline]
fn eq(&self, other: &AnalyzeFormatKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(AnalyzeFormatKind::Keyword(__self_0),
AnalyzeFormatKind::Keyword(__arg1_0)) =>
__self_0 == __arg1_0,
(AnalyzeFormatKind::Assignment(__self_0),
AnalyzeFormatKind::Assignment(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AnalyzeFormatKind {
#[inline]
fn partial_cmp(&self, other: &AnalyzeFormatKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(AnalyzeFormatKind::Keyword(__self_0),
AnalyzeFormatKind::Keyword(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(AnalyzeFormatKind::Assignment(__self_0),
AnalyzeFormatKind::Assignment(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AnalyzeFormatKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<AnalyzeFormat>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AnalyzeFormatKind {
#[inline]
fn cmp(&self, other: &AnalyzeFormatKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(AnalyzeFormatKind::Keyword(__self_0),
AnalyzeFormatKind::Keyword(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(AnalyzeFormatKind::Assignment(__self_0),
AnalyzeFormatKind::Assignment(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AnalyzeFormatKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
AnalyzeFormatKind::Keyword(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
AnalyzeFormatKind::Assignment(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
7726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7727#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AnalyzeFormatKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Keyword(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Assignment(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for AnalyzeFormatKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Keyword(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Assignment(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7728pub enum AnalyzeFormatKind {
7729 Keyword(AnalyzeFormat),
7731 Assignment(AnalyzeFormat),
7733}
7734
7735impl fmt::Display for AnalyzeFormatKind {
7736 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7737 match self {
7738 AnalyzeFormatKind::Keyword(format) => f.write_fmt(format_args!("FORMAT {0}", format))write!(f, "FORMAT {format}"),
7739 AnalyzeFormatKind::Assignment(format) => f.write_fmt(format_args!("FORMAT={0}", format))write!(f, "FORMAT={format}"),
7740 }
7741 }
7742}
7743
7744#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AnalyzeFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
AnalyzeFormat::TEXT => "TEXT",
AnalyzeFormat::GRAPHVIZ => "GRAPHVIZ",
AnalyzeFormat::JSON => "JSON",
AnalyzeFormat::TRADITIONAL => "TRADITIONAL",
AnalyzeFormat::TREE => "TREE",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for AnalyzeFormat { }Copy, #[automatically_derived]
impl ::core::clone::Clone for AnalyzeFormat {
#[inline]
fn clone(&self) -> AnalyzeFormat { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AnalyzeFormat {
#[inline]
fn eq(&self, other: &AnalyzeFormat) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AnalyzeFormat {
#[inline]
fn partial_cmp(&self, other: &AnalyzeFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AnalyzeFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AnalyzeFormat {
#[inline]
fn cmp(&self, other: &AnalyzeFormat) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AnalyzeFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7746#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AnalyzeFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::TEXT => {}
Self::GRAPHVIZ => {}
Self::JSON => {}
Self::TRADITIONAL => {}
Self::TREE => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for AnalyzeFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::TEXT => {}
Self::GRAPHVIZ => {}
Self::JSON => {}
Self::TRADITIONAL => {}
Self::TREE => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7747pub enum AnalyzeFormat {
7748 TEXT,
7749 GRAPHVIZ,
7750 JSON,
7751 TRADITIONAL,
7752 TREE,
7753}
7754
7755impl fmt::Display for AnalyzeFormat {
7756 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7757 f.write_str(match self {
7758 AnalyzeFormat::TEXT => "TEXT",
7759 AnalyzeFormat::GRAPHVIZ => "GRAPHVIZ",
7760 AnalyzeFormat::JSON => "JSON",
7761 AnalyzeFormat::TRADITIONAL => "TRADITIONAL",
7762 AnalyzeFormat::TREE => "TREE",
7763 })
7764 }
7765}
7766
7767#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FileFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FileFormat::TEXTFILE => "TEXTFILE",
FileFormat::SEQUENCEFILE => "SEQUENCEFILE",
FileFormat::ORC => "ORC",
FileFormat::PARQUET => "PARQUET",
FileFormat::AVRO => "AVRO",
FileFormat::RCFILE => "RCFILE",
FileFormat::JSONFILE => "JSONFILE",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for FileFormat { }Copy, #[automatically_derived]
impl ::core::clone::Clone for FileFormat {
#[inline]
fn clone(&self) -> FileFormat { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FileFormat {
#[inline]
fn eq(&self, other: &FileFormat) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FileFormat {
#[inline]
fn partial_cmp(&self, other: &FileFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FileFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FileFormat {
#[inline]
fn cmp(&self, other: &FileFormat) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FileFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7770#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FileFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::TEXTFILE => {}
Self::SEQUENCEFILE => {}
Self::ORC => {}
Self::PARQUET => {}
Self::AVRO => {}
Self::RCFILE => {}
Self::JSONFILE => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FileFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::TEXTFILE => {}
Self::SEQUENCEFILE => {}
Self::ORC => {}
Self::PARQUET => {}
Self::AVRO => {}
Self::RCFILE => {}
Self::JSONFILE => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7771pub enum FileFormat {
7772 TEXTFILE,
7773 SEQUENCEFILE,
7774 ORC,
7775 PARQUET,
7776 AVRO,
7777 RCFILE,
7778 JSONFILE,
7779}
7780
7781impl fmt::Display for FileFormat {
7782 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7783 use self::FileFormat::*;
7784 f.write_str(match self {
7785 TEXTFILE => "TEXTFILE",
7786 SEQUENCEFILE => "SEQUENCEFILE",
7787 ORC => "ORC",
7788 PARQUET => "PARQUET",
7789 AVRO => "AVRO",
7790 RCFILE => "RCFILE",
7791 JSONFILE => "JSONFILE",
7792 })
7793 }
7794}
7795
7796#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ListAggOnOverflow {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ListAggOnOverflow::Error =>
::core::fmt::Formatter::write_str(f, "Error"),
ListAggOnOverflow::Truncate {
filler: __self_0, with_count: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Truncate", "filler", __self_0, "with_count", &__self_1),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ListAggOnOverflow {
#[inline]
fn clone(&self) -> ListAggOnOverflow {
match self {
ListAggOnOverflow::Error => ListAggOnOverflow::Error,
ListAggOnOverflow::Truncate {
filler: __self_0, with_count: __self_1 } =>
ListAggOnOverflow::Truncate {
filler: ::core::clone::Clone::clone(__self_0),
with_count: ::core::clone::Clone::clone(__self_1),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ListAggOnOverflow {
#[inline]
fn eq(&self, other: &ListAggOnOverflow) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(ListAggOnOverflow::Truncate {
filler: __self_0, with_count: __self_1 },
ListAggOnOverflow::Truncate {
filler: __arg1_0, with_count: __arg1_1 }) =>
__self_1 == __arg1_1 && __self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ListAggOnOverflow {
#[inline]
fn partial_cmp(&self, other: &ListAggOnOverflow)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(ListAggOnOverflow::Truncate {
filler: __self_0, with_count: __self_1 },
ListAggOnOverflow::Truncate {
filler: __arg1_0, with_count: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ListAggOnOverflow {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ListAggOnOverflow {
#[inline]
fn cmp(&self, other: &ListAggOnOverflow) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(ListAggOnOverflow::Truncate {
filler: __self_0, with_count: __self_1 },
ListAggOnOverflow::Truncate {
filler: __arg1_0, with_count: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ListAggOnOverflow {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
ListAggOnOverflow::Truncate {
filler: __self_0, with_count: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
_ => {}
}
}
}Hash)]
7798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7799#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ListAggOnOverflow {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Error => {}
Self::Truncate { filler, with_count } => {
sqlparser::ast::Visit::visit(filler, visitor)?;
sqlparser::ast::Visit::visit(with_count, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ListAggOnOverflow {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Error => {}
Self::Truncate { filler, with_count } => {
sqlparser::ast::VisitMut::visit(filler, visitor)?;
sqlparser::ast::VisitMut::visit(with_count, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7800pub enum ListAggOnOverflow {
7801 Error,
7803
7804 Truncate {
7806 filler: Option<Box<Expr>>,
7807 with_count: bool,
7808 },
7809}
7810
7811impl fmt::Display for ListAggOnOverflow {
7812 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7813 f.write_fmt(format_args!("ON OVERFLOW"))write!(f, "ON OVERFLOW")?;
7814 match self {
7815 ListAggOnOverflow::Error => f.write_fmt(format_args!(" ERROR"))write!(f, " ERROR"),
7816 ListAggOnOverflow::Truncate { filler, with_count } => {
7817 f.write_fmt(format_args!(" TRUNCATE"))write!(f, " TRUNCATE")?;
7818 if let Some(filler) = filler {
7819 f.write_fmt(format_args!(" {0}", filler))write!(f, " {filler}")?;
7820 }
7821 if *with_count {
7822 f.write_fmt(format_args!(" WITH"))write!(f, " WITH")?;
7823 } else {
7824 f.write_fmt(format_args!(" WITHOUT"))write!(f, " WITHOUT")?;
7825 }
7826 f.write_fmt(format_args!(" COUNT"))write!(f, " COUNT")
7827 }
7828 }
7829 }
7830}
7831
7832#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HavingBound {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_tuple_field2_finish(f, "HavingBound",
&self.0, &&self.1)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HavingBound {
#[inline]
fn clone(&self) -> HavingBound {
HavingBound(::core::clone::Clone::clone(&self.0),
::core::clone::Clone::clone(&self.1))
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HavingBound {
#[inline]
fn eq(&self, other: &HavingBound) -> bool {
self.0 == other.0 && self.1 == other.1
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HavingBound {
#[inline]
fn partial_cmp(&self, other: &HavingBound)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.0, &other.0) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.1, &other.1),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HavingBound {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<HavingBoundKind>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HavingBound {
#[inline]
fn cmp(&self, other: &HavingBound) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.0, &other.0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.1, &other.1),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HavingBound {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.0, state);
::core::hash::Hash::hash(&self.1, state)
}
}Hash)]
7834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7835#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HavingBound {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.0, visitor)?;
sqlparser::ast::Visit::visit(&self.1, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HavingBound {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.0, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.1, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7836pub struct HavingBound(pub HavingBoundKind, pub Expr);
7837
7838impl fmt::Display for HavingBound {
7839 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7840 f.write_fmt(format_args!("HAVING {0} {1}", self.0, self.1))write!(f, "HAVING {} {}", self.0, self.1)
7841 }
7842}
7843
7844#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HavingBoundKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
HavingBoundKind::Min => "Min",
HavingBoundKind::Max => "Max",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for HavingBoundKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for HavingBoundKind {
#[inline]
fn clone(&self) -> HavingBoundKind { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HavingBoundKind {
#[inline]
fn eq(&self, other: &HavingBoundKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HavingBoundKind {
#[inline]
fn partial_cmp(&self, other: &HavingBoundKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HavingBoundKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HavingBoundKind {
#[inline]
fn cmp(&self, other: &HavingBoundKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HavingBoundKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7846#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HavingBoundKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Min => {} Self::Max => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HavingBoundKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Min => {} Self::Max => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7847pub enum HavingBoundKind {
7848 Min,
7849 Max,
7850}
7851
7852impl fmt::Display for HavingBoundKind {
7853 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7854 match self {
7855 HavingBoundKind::Min => f.write_fmt(format_args!("MIN"))write!(f, "MIN"),
7856 HavingBoundKind::Max => f.write_fmt(format_args!("MAX"))write!(f, "MAX"),
7857 }
7858 }
7859}
7860
7861#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ObjectType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ObjectType::Table => "Table",
ObjectType::View => "View",
ObjectType::MaterializedView => "MaterializedView",
ObjectType::Index => "Index",
ObjectType::Schema => "Schema",
ObjectType::Database => "Database",
ObjectType::Role => "Role",
ObjectType::Sequence => "Sequence",
ObjectType::Stage => "Stage",
ObjectType::Type => "Type",
ObjectType::User => "User",
ObjectType::Stream => "Stream",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for ObjectType { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ObjectType {
#[inline]
fn clone(&self) -> ObjectType { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ObjectType {
#[inline]
fn eq(&self, other: &ObjectType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ObjectType {
#[inline]
fn partial_cmp(&self, other: &ObjectType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ObjectType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ObjectType {
#[inline]
fn cmp(&self, other: &ObjectType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ObjectType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7863#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ObjectType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Table => {}
Self::View => {}
Self::MaterializedView => {}
Self::Index => {}
Self::Schema => {}
Self::Database => {}
Self::Role => {}
Self::Sequence => {}
Self::Stage => {}
Self::Type => {}
Self::User => {}
Self::Stream => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ObjectType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Table => {}
Self::View => {}
Self::MaterializedView => {}
Self::Index => {}
Self::Schema => {}
Self::Database => {}
Self::Role => {}
Self::Sequence => {}
Self::Stage => {}
Self::Type => {}
Self::User => {}
Self::Stream => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7864pub enum ObjectType {
7865 Table,
7866 View,
7867 MaterializedView,
7868 Index,
7869 Schema,
7870 Database,
7871 Role,
7872 Sequence,
7873 Stage,
7874 Type,
7875 User,
7876 Stream,
7877}
7878
7879impl fmt::Display for ObjectType {
7880 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7881 f.write_str(match self {
7882 ObjectType::Table => "TABLE",
7883 ObjectType::View => "VIEW",
7884 ObjectType::MaterializedView => "MATERIALIZED VIEW",
7885 ObjectType::Index => "INDEX",
7886 ObjectType::Schema => "SCHEMA",
7887 ObjectType::Database => "DATABASE",
7888 ObjectType::Role => "ROLE",
7889 ObjectType::Sequence => "SEQUENCE",
7890 ObjectType::Stage => "STAGE",
7891 ObjectType::Type => "TYPE",
7892 ObjectType::User => "USER",
7893 ObjectType::Stream => "STREAM",
7894 })
7895 }
7896}
7897
7898#[derive(#[automatically_derived]
impl ::core::fmt::Debug for KillType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
KillType::Connection => "Connection",
KillType::Query => "Query",
KillType::Mutation => "Mutation",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for KillType { }Copy, #[automatically_derived]
impl ::core::clone::Clone for KillType {
#[inline]
fn clone(&self) -> KillType { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for KillType {
#[inline]
fn eq(&self, other: &KillType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for KillType {
#[inline]
fn partial_cmp(&self, other: &KillType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for KillType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for KillType {
#[inline]
fn cmp(&self, other: &KillType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for KillType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7900#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for KillType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Connection => {}
Self::Query => {}
Self::Mutation => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for KillType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Connection => {}
Self::Query => {}
Self::Mutation => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7901pub enum KillType {
7902 Connection,
7903 Query,
7904 Mutation,
7905}
7906
7907impl fmt::Display for KillType {
7908 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7909 f.write_str(match self {
7910 KillType::Connection => "CONNECTION",
7912 KillType::Query => "QUERY",
7913 KillType::Mutation => "MUTATION",
7915 })
7916 }
7917}
7918
7919#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveDistributionStyle {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
HiveDistributionStyle::PARTITIONED { columns: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"PARTITIONED", "columns", &__self_0),
HiveDistributionStyle::SKEWED {
columns: __self_0,
on: __self_1,
stored_as_directories: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"SKEWED", "columns", __self_0, "on", __self_1,
"stored_as_directories", &__self_2),
HiveDistributionStyle::NONE =>
::core::fmt::Formatter::write_str(f, "NONE"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HiveDistributionStyle {
#[inline]
fn clone(&self) -> HiveDistributionStyle {
match self {
HiveDistributionStyle::PARTITIONED { columns: __self_0 } =>
HiveDistributionStyle::PARTITIONED {
columns: ::core::clone::Clone::clone(__self_0),
},
HiveDistributionStyle::SKEWED {
columns: __self_0,
on: __self_1,
stored_as_directories: __self_2 } =>
HiveDistributionStyle::SKEWED {
columns: ::core::clone::Clone::clone(__self_0),
on: ::core::clone::Clone::clone(__self_1),
stored_as_directories: ::core::clone::Clone::clone(__self_2),
},
HiveDistributionStyle::NONE => HiveDistributionStyle::NONE,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveDistributionStyle {
#[inline]
fn eq(&self, other: &HiveDistributionStyle) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(HiveDistributionStyle::PARTITIONED { columns: __self_0 },
HiveDistributionStyle::PARTITIONED { columns: __arg1_0 }) =>
__self_0 == __arg1_0,
(HiveDistributionStyle::SKEWED {
columns: __self_0,
on: __self_1,
stored_as_directories: __self_2 },
HiveDistributionStyle::SKEWED {
columns: __arg1_0,
on: __arg1_1,
stored_as_directories: __arg1_2 }) =>
__self_2 == __arg1_2 && __self_0 == __arg1_0 &&
__self_1 == __arg1_1,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveDistributionStyle {
#[inline]
fn partial_cmp(&self, other: &HiveDistributionStyle)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(HiveDistributionStyle::PARTITIONED { columns: __self_0 },
HiveDistributionStyle::PARTITIONED { columns: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(HiveDistributionStyle::SKEWED {
columns: __self_0,
on: __self_1,
stored_as_directories: __self_2 },
HiveDistributionStyle::SKEWED {
columns: __arg1_0,
on: __arg1_1,
stored_as_directories: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveDistributionStyle {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<ColumnDef>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ColumnDef>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ColumnDef>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveDistributionStyle {
#[inline]
fn cmp(&self, other: &HiveDistributionStyle) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(HiveDistributionStyle::PARTITIONED { columns: __self_0 },
HiveDistributionStyle::PARTITIONED { columns: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(HiveDistributionStyle::SKEWED {
columns: __self_0,
on: __self_1,
stored_as_directories: __self_2 },
HiveDistributionStyle::SKEWED {
columns: __arg1_0,
on: __arg1_1,
stored_as_directories: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveDistributionStyle {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
HiveDistributionStyle::PARTITIONED { columns: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
HiveDistributionStyle::SKEWED {
columns: __self_0,
on: __self_1,
stored_as_directories: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
_ => {}
}
}
}Hash)]
7920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7921#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveDistributionStyle {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::PARTITIONED { columns } => {
sqlparser::ast::Visit::visit(columns, visitor)?;
}
Self::SKEWED { columns, on, stored_as_directories } => {
sqlparser::ast::Visit::visit(columns, visitor)?;
sqlparser::ast::Visit::visit(on, visitor)?;
sqlparser::ast::Visit::visit(stored_as_directories, visitor)?;
}
Self::NONE => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveDistributionStyle {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::PARTITIONED { columns } => {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
}
Self::SKEWED { columns, on, stored_as_directories } => {
sqlparser::ast::VisitMut::visit(columns, visitor)?;
sqlparser::ast::VisitMut::visit(on, visitor)?;
sqlparser::ast::VisitMut::visit(stored_as_directories,
visitor)?;
}
Self::NONE => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7922pub enum HiveDistributionStyle {
7923 PARTITIONED {
7924 columns: Vec<ColumnDef>,
7925 },
7926 SKEWED {
7927 columns: Vec<ColumnDef>,
7928 on: Vec<ColumnDef>,
7929 stored_as_directories: bool,
7930 },
7931 NONE,
7932}
7933
7934#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveRowFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
HiveRowFormat::SERDE { class: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "SERDE",
"class", &__self_0),
HiveRowFormat::DELIMITED { delimiters: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"DELIMITED", "delimiters", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HiveRowFormat {
#[inline]
fn clone(&self) -> HiveRowFormat {
match self {
HiveRowFormat::SERDE { class: __self_0 } =>
HiveRowFormat::SERDE {
class: ::core::clone::Clone::clone(__self_0),
},
HiveRowFormat::DELIMITED { delimiters: __self_0 } =>
HiveRowFormat::DELIMITED {
delimiters: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveRowFormat {
#[inline]
fn eq(&self, other: &HiveRowFormat) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(HiveRowFormat::SERDE { class: __self_0 },
HiveRowFormat::SERDE { class: __arg1_0 }) =>
__self_0 == __arg1_0,
(HiveRowFormat::DELIMITED { delimiters: __self_0 },
HiveRowFormat::DELIMITED { delimiters: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveRowFormat {
#[inline]
fn partial_cmp(&self, other: &HiveRowFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(HiveRowFormat::SERDE { class: __self_0 }, HiveRowFormat::SERDE {
class: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(HiveRowFormat::DELIMITED { delimiters: __self_0 },
HiveRowFormat::DELIMITED { delimiters: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveRowFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<Vec<HiveRowDelimiter>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveRowFormat {
#[inline]
fn cmp(&self, other: &HiveRowFormat) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(HiveRowFormat::SERDE { class: __self_0 },
HiveRowFormat::SERDE { class: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(HiveRowFormat::DELIMITED { delimiters: __self_0 },
HiveRowFormat::DELIMITED { delimiters: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveRowFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
HiveRowFormat::SERDE { class: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
HiveRowFormat::DELIMITED { delimiters: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
7935#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7936#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveRowFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::SERDE { class } => {
sqlparser::ast::Visit::visit(class, visitor)?;
}
Self::DELIMITED { delimiters } => {
sqlparser::ast::Visit::visit(delimiters, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveRowFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::SERDE { class } => {
sqlparser::ast::VisitMut::visit(class, visitor)?;
}
Self::DELIMITED { delimiters } => {
sqlparser::ast::VisitMut::visit(delimiters, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7937pub enum HiveRowFormat {
7938 SERDE { class: String },
7939 DELIMITED { delimiters: Vec<HiveRowDelimiter> },
7940}
7941
7942#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveLoadDataFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"HiveLoadDataFormat", "serde", &self.serde, "input_format",
&&self.input_format)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HiveLoadDataFormat {
#[inline]
fn clone(&self) -> HiveLoadDataFormat {
HiveLoadDataFormat {
serde: ::core::clone::Clone::clone(&self.serde),
input_format: ::core::clone::Clone::clone(&self.input_format),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveLoadDataFormat {
#[inline]
fn eq(&self, other: &HiveLoadDataFormat) -> bool {
self.serde == other.serde && self.input_format == other.input_format
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveLoadDataFormat {
#[inline]
fn partial_cmp(&self, other: &HiveLoadDataFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.serde, &other.serde)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.input_format,
&other.input_format),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveLoadDataFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveLoadDataFormat {
#[inline]
fn cmp(&self, other: &HiveLoadDataFormat) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.serde, &other.serde) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.input_format,
&other.input_format),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveLoadDataFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.serde, state);
::core::hash::Hash::hash(&self.input_format, state)
}
}Hash)]
7943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7944#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveLoadDataFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.serde, visitor)?;
sqlparser::ast::Visit::visit(&self.input_format, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveLoadDataFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.serde, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.input_format, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7945pub struct HiveLoadDataFormat {
7946 pub serde: Expr,
7947 pub input_format: Expr,
7948}
7949
7950#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveRowDelimiter {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"HiveRowDelimiter", "delimiter", &self.delimiter, "char",
&&self.char)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HiveRowDelimiter {
#[inline]
fn clone(&self) -> HiveRowDelimiter {
HiveRowDelimiter {
delimiter: ::core::clone::Clone::clone(&self.delimiter),
char: ::core::clone::Clone::clone(&self.char),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveRowDelimiter {
#[inline]
fn eq(&self, other: &HiveRowDelimiter) -> bool {
self.delimiter == other.delimiter && self.char == other.char
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveRowDelimiter {
#[inline]
fn partial_cmp(&self, other: &HiveRowDelimiter)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.delimiter,
&other.delimiter) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.char, &other.char),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveRowDelimiter {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<HiveDelimiter>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveRowDelimiter {
#[inline]
fn cmp(&self, other: &HiveRowDelimiter) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.delimiter, &other.delimiter) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.char, &other.char),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveRowDelimiter {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.delimiter, state);
::core::hash::Hash::hash(&self.char, state)
}
}Hash)]
7951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7952#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveRowDelimiter {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.delimiter, visitor)?;
sqlparser::ast::Visit::visit(&self.char, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveRowDelimiter {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.delimiter, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.char, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7953pub struct HiveRowDelimiter {
7954 pub delimiter: HiveDelimiter,
7955 pub char: Ident,
7956}
7957
7958impl fmt::Display for HiveRowDelimiter {
7959 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7960 f.write_fmt(format_args!("{0} ", self.delimiter))write!(f, "{} ", self.delimiter)?;
7961 f.write_fmt(format_args!("{0}", self.char))write!(f, "{}", self.char)
7962 }
7963}
7964
7965#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveDelimiter {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
HiveDelimiter::FieldsTerminatedBy => "FieldsTerminatedBy",
HiveDelimiter::FieldsEscapedBy => "FieldsEscapedBy",
HiveDelimiter::CollectionItemsTerminatedBy =>
"CollectionItemsTerminatedBy",
HiveDelimiter::MapKeysTerminatedBy => "MapKeysTerminatedBy",
HiveDelimiter::LinesTerminatedBy => "LinesTerminatedBy",
HiveDelimiter::NullDefinedAs => "NullDefinedAs",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for HiveDelimiter { }Copy, #[automatically_derived]
impl ::core::clone::Clone for HiveDelimiter {
#[inline]
fn clone(&self) -> HiveDelimiter { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveDelimiter {
#[inline]
fn eq(&self, other: &HiveDelimiter) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveDelimiter {
#[inline]
fn partial_cmp(&self, other: &HiveDelimiter)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveDelimiter {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveDelimiter {
#[inline]
fn cmp(&self, other: &HiveDelimiter) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveDelimiter {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7967#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveDelimiter {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::FieldsTerminatedBy => {}
Self::FieldsEscapedBy => {}
Self::CollectionItemsTerminatedBy => {}
Self::MapKeysTerminatedBy => {}
Self::LinesTerminatedBy => {}
Self::NullDefinedAs => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveDelimiter {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::FieldsTerminatedBy => {}
Self::FieldsEscapedBy => {}
Self::CollectionItemsTerminatedBy => {}
Self::MapKeysTerminatedBy => {}
Self::LinesTerminatedBy => {}
Self::NullDefinedAs => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7968pub enum HiveDelimiter {
7969 FieldsTerminatedBy,
7970 FieldsEscapedBy,
7971 CollectionItemsTerminatedBy,
7972 MapKeysTerminatedBy,
7973 LinesTerminatedBy,
7974 NullDefinedAs,
7975}
7976
7977impl fmt::Display for HiveDelimiter {
7978 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7979 use HiveDelimiter::*;
7980 f.write_str(match self {
7981 FieldsTerminatedBy => "FIELDS TERMINATED BY",
7982 FieldsEscapedBy => "ESCAPED BY",
7983 CollectionItemsTerminatedBy => "COLLECTION ITEMS TERMINATED BY",
7984 MapKeysTerminatedBy => "MAP KEYS TERMINATED BY",
7985 LinesTerminatedBy => "LINES TERMINATED BY",
7986 NullDefinedAs => "NULL DEFINED AS",
7987 })
7988 }
7989}
7990
7991#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveDescribeFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
HiveDescribeFormat::Extended => "Extended",
HiveDescribeFormat::Formatted => "Formatted",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for HiveDescribeFormat { }Copy, #[automatically_derived]
impl ::core::clone::Clone for HiveDescribeFormat {
#[inline]
fn clone(&self) -> HiveDescribeFormat { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveDescribeFormat {
#[inline]
fn eq(&self, other: &HiveDescribeFormat) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveDescribeFormat {
#[inline]
fn partial_cmp(&self, other: &HiveDescribeFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveDescribeFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveDescribeFormat {
#[inline]
fn cmp(&self, other: &HiveDescribeFormat) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveDescribeFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
7992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7993#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveDescribeFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Extended => {} Self::Formatted => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveDescribeFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Extended => {} Self::Formatted => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
7994pub enum HiveDescribeFormat {
7995 Extended,
7996 Formatted,
7997}
7998
7999impl fmt::Display for HiveDescribeFormat {
8000 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8001 use HiveDescribeFormat::*;
8002 f.write_str(match self {
8003 Extended => "EXTENDED",
8004 Formatted => "FORMATTED",
8005 })
8006 }
8007}
8008
8009#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DescribeAlias {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
DescribeAlias::Describe => "Describe",
DescribeAlias::Explain => "Explain",
DescribeAlias::Desc => "Desc",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for DescribeAlias { }Copy, #[automatically_derived]
impl ::core::clone::Clone for DescribeAlias {
#[inline]
fn clone(&self) -> DescribeAlias { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DescribeAlias {
#[inline]
fn eq(&self, other: &DescribeAlias) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DescribeAlias {
#[inline]
fn partial_cmp(&self, other: &DescribeAlias)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DescribeAlias {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DescribeAlias {
#[inline]
fn cmp(&self, other: &DescribeAlias) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DescribeAlias {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8011#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DescribeAlias {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Describe => {}
Self::Explain => {}
Self::Desc => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DescribeAlias {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Describe => {}
Self::Explain => {}
Self::Desc => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8012pub enum DescribeAlias {
8013 Describe,
8014 Explain,
8015 Desc,
8016}
8017
8018impl fmt::Display for DescribeAlias {
8019 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8020 use DescribeAlias::*;
8021 f.write_str(match self {
8022 Describe => "DESCRIBE",
8023 Explain => "EXPLAIN",
8024 Desc => "DESC",
8025 })
8026 }
8027}
8028
8029#[derive(#[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::fmt::Debug for HiveIOFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
HiveIOFormat::IOF {
input_format: __self_0, output_format: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "IOF",
"input_format", __self_0, "output_format", &__self_1),
HiveIOFormat::FileFormat { format: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"FileFormat", "format", &__self_0),
}
}
}Debug, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::clone::Clone for HiveIOFormat {
#[inline]
fn clone(&self) -> HiveIOFormat {
match self {
HiveIOFormat::IOF {
input_format: __self_0, output_format: __self_1 } =>
HiveIOFormat::IOF {
input_format: ::core::clone::Clone::clone(__self_0),
output_format: ::core::clone::Clone::clone(__self_1),
},
HiveIOFormat::FileFormat { format: __self_0 } =>
HiveIOFormat::FileFormat {
format: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::PartialEq for HiveIOFormat {
#[inline]
fn eq(&self, other: &HiveIOFormat) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(HiveIOFormat::IOF {
input_format: __self_0, output_format: __self_1 },
HiveIOFormat::IOF {
input_format: __arg1_0, output_format: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(HiveIOFormat::FileFormat { format: __self_0 },
HiveIOFormat::FileFormat { format: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::PartialOrd for HiveIOFormat {
#[inline]
fn partial_cmp(&self, other: &HiveIOFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(HiveIOFormat::IOF {
input_format: __self_0, output_format: __self_1 },
HiveIOFormat::IOF {
input_format: __arg1_0, output_format: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(HiveIOFormat::FileFormat { format: __self_0 },
HiveIOFormat::FileFormat { format: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::Eq for HiveIOFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<FileFormat>;
}
}Eq, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::Ord for HiveIOFormat {
#[inline]
fn cmp(&self, other: &HiveIOFormat) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(HiveIOFormat::IOF {
input_format: __self_0, output_format: __self_1 },
HiveIOFormat::IOF {
input_format: __arg1_0, output_format: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(HiveIOFormat::FileFormat { format: __self_0 },
HiveIOFormat::FileFormat { format: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::hash::Hash for HiveIOFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
HiveIOFormat::IOF {
input_format: __self_0, output_format: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
HiveIOFormat::FileFormat { format: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8031#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveIOFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IOF { input_format, output_format } => {
sqlparser::ast::Visit::visit(input_format, visitor)?;
sqlparser::ast::Visit::visit(output_format, visitor)?;
}
Self::FileFormat { format } => {
sqlparser::ast::Visit::visit(format, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveIOFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IOF { input_format, output_format } => {
sqlparser::ast::VisitMut::visit(input_format, visitor)?;
sqlparser::ast::VisitMut::visit(output_format, visitor)?;
}
Self::FileFormat { format } => {
sqlparser::ast::VisitMut::visit(format, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8032#[allow(clippy::large_enum_variant)]
8033pub enum HiveIOFormat {
8034 IOF {
8035 input_format: Expr,
8036 output_format: Expr,
8037 },
8038 FileFormat {
8039 format: FileFormat,
8040 },
8041}
8042
8043#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveFormat {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f, "HiveFormat",
"row_format", &self.row_format, "serde_properties",
&self.serde_properties, "storage", &self.storage, "location",
&&self.location)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HiveFormat {
#[inline]
fn clone(&self) -> HiveFormat {
HiveFormat {
row_format: ::core::clone::Clone::clone(&self.row_format),
serde_properties: ::core::clone::Clone::clone(&self.serde_properties),
storage: ::core::clone::Clone::clone(&self.storage),
location: ::core::clone::Clone::clone(&self.location),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveFormat {
#[inline]
fn eq(&self, other: &HiveFormat) -> bool {
self.row_format == other.row_format &&
self.serde_properties == other.serde_properties &&
self.storage == other.storage &&
self.location == other.location
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveFormat {
#[inline]
fn partial_cmp(&self, other: &HiveFormat)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.row_format,
&other.row_format) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.serde_properties,
&other.serde_properties) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.storage,
&other.storage) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.location,
&other.location),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveFormat {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<HiveRowFormat>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
let _: ::core::cmp::AssertParamIsEq<Option<HiveIOFormat>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveFormat {
#[inline]
fn cmp(&self, other: &HiveFormat) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.row_format, &other.row_format) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.serde_properties,
&other.serde_properties) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.storage, &other.storage) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.location, &other.location),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveFormat {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.row_format, state);
::core::hash::Hash::hash(&self.serde_properties, state);
::core::hash::Hash::hash(&self.storage, state);
::core::hash::Hash::hash(&self.location, state)
}
}Hash, #[automatically_derived]
impl ::core::default::Default for HiveFormat {
#[inline]
fn default() -> HiveFormat {
HiveFormat {
row_format: ::core::default::Default::default(),
serde_properties: ::core::default::Default::default(),
storage: ::core::default::Default::default(),
location: ::core::default::Default::default(),
}
}
}Default)]
8044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8045#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveFormat {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.row_format, visitor)?;
sqlparser::ast::Visit::visit(&self.serde_properties, visitor)?;
sqlparser::ast::Visit::visit(&self.storage, visitor)?;
sqlparser::ast::Visit::visit(&self.location, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveFormat {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.row_format, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.serde_properties, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.storage, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.location, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8046pub struct HiveFormat {
8047 pub row_format: Option<HiveRowFormat>,
8048 pub serde_properties: Option<Vec<SqlOption>>,
8049 pub storage: Option<HiveIOFormat>,
8050 pub location: Option<String>,
8051}
8052
8053#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ClusteredIndex {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"ClusteredIndex", "name", &self.name, "asc", &&self.asc)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ClusteredIndex {
#[inline]
fn clone(&self) -> ClusteredIndex {
ClusteredIndex {
name: ::core::clone::Clone::clone(&self.name),
asc: ::core::clone::Clone::clone(&self.asc),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ClusteredIndex {
#[inline]
fn eq(&self, other: &ClusteredIndex) -> bool {
self.name == other.name && self.asc == other.asc
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ClusteredIndex {
#[inline]
fn partial_cmp(&self, other: &ClusteredIndex)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.asc, &other.asc),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ClusteredIndex {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ClusteredIndex {
#[inline]
fn cmp(&self, other: &ClusteredIndex) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.asc, &other.asc),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ClusteredIndex {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.asc, state)
}
}Hash)]
8054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8055#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ClusteredIndex {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.asc, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ClusteredIndex {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.asc, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8056pub struct ClusteredIndex {
8057 pub name: Ident,
8058 pub asc: Option<bool>,
8059}
8060
8061impl fmt::Display for ClusteredIndex {
8062 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8063 f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)?;
8064 match self.asc {
8065 Some(true) => f.write_fmt(format_args!(" ASC"))write!(f, " ASC"),
8066 Some(false) => f.write_fmt(format_args!(" DESC"))write!(f, " DESC"),
8067 _ => Ok(()),
8068 }
8069 }
8070}
8071
8072#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TableOptionsClustered {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
TableOptionsClustered::ColumnstoreIndex =>
::core::fmt::Formatter::write_str(f, "ColumnstoreIndex"),
TableOptionsClustered::ColumnstoreIndexOrder(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ColumnstoreIndexOrder", &__self_0),
TableOptionsClustered::Index(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Index",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TableOptionsClustered {
#[inline]
fn clone(&self) -> TableOptionsClustered {
match self {
TableOptionsClustered::ColumnstoreIndex =>
TableOptionsClustered::ColumnstoreIndex,
TableOptionsClustered::ColumnstoreIndexOrder(__self_0) =>
TableOptionsClustered::ColumnstoreIndexOrder(::core::clone::Clone::clone(__self_0)),
TableOptionsClustered::Index(__self_0) =>
TableOptionsClustered::Index(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TableOptionsClustered {
#[inline]
fn eq(&self, other: &TableOptionsClustered) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(TableOptionsClustered::ColumnstoreIndexOrder(__self_0),
TableOptionsClustered::ColumnstoreIndexOrder(__arg1_0)) =>
__self_0 == __arg1_0,
(TableOptionsClustered::Index(__self_0),
TableOptionsClustered::Index(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TableOptionsClustered {
#[inline]
fn partial_cmp(&self, other: &TableOptionsClustered)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(TableOptionsClustered::ColumnstoreIndexOrder(__self_0),
TableOptionsClustered::ColumnstoreIndexOrder(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(TableOptionsClustered::Index(__self_0),
TableOptionsClustered::Index(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TableOptionsClustered {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<ClusteredIndex>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TableOptionsClustered {
#[inline]
fn cmp(&self, other: &TableOptionsClustered) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(TableOptionsClustered::ColumnstoreIndexOrder(__self_0),
TableOptionsClustered::ColumnstoreIndexOrder(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(TableOptionsClustered::Index(__self_0),
TableOptionsClustered::Index(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TableOptionsClustered {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
TableOptionsClustered::ColumnstoreIndexOrder(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
TableOptionsClustered::Index(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
8073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8074#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TableOptionsClustered {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ColumnstoreIndex => {}
Self::ColumnstoreIndexOrder(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Index(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TableOptionsClustered {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ColumnstoreIndex => {}
Self::ColumnstoreIndexOrder(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Index(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8075pub enum TableOptionsClustered {
8076 ColumnstoreIndex,
8077 ColumnstoreIndexOrder(Vec<Ident>),
8078 Index(Vec<ClusteredIndex>),
8079}
8080
8081impl fmt::Display for TableOptionsClustered {
8082 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8083 match self {
8084 TableOptionsClustered::ColumnstoreIndex => {
8085 f.write_fmt(format_args!("CLUSTERED COLUMNSTORE INDEX"))write!(f, "CLUSTERED COLUMNSTORE INDEX")
8086 }
8087 TableOptionsClustered::ColumnstoreIndexOrder(values) => {
8088 f.write_fmt(format_args!("CLUSTERED COLUMNSTORE INDEX ORDER ({0})",
display_comma_separated(values)))write!(
8089 f,
8090 "CLUSTERED COLUMNSTORE INDEX ORDER ({})",
8091 display_comma_separated(values)
8092 )
8093 }
8094 TableOptionsClustered::Index(values) => {
8095 f.write_fmt(format_args!("CLUSTERED INDEX ({0})",
display_comma_separated(values)))write!(f, "CLUSTERED INDEX ({})", display_comma_separated(values))
8096 }
8097 }
8098 }
8099}
8100
8101#[derive(#[automatically_derived]
impl ::core::fmt::Debug for PartitionRangeDirection {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
PartitionRangeDirection::Left => "Left",
PartitionRangeDirection::Right => "Right",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for PartitionRangeDirection {
#[inline]
fn clone(&self) -> PartitionRangeDirection {
match self {
PartitionRangeDirection::Left => PartitionRangeDirection::Left,
PartitionRangeDirection::Right => PartitionRangeDirection::Right,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for PartitionRangeDirection {
#[inline]
fn eq(&self, other: &PartitionRangeDirection) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for PartitionRangeDirection {
#[inline]
fn partial_cmp(&self, other: &PartitionRangeDirection)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for PartitionRangeDirection {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for PartitionRangeDirection {
#[inline]
fn cmp(&self, other: &PartitionRangeDirection) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for PartitionRangeDirection {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8104#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for PartitionRangeDirection {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Left => {} Self::Right => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for PartitionRangeDirection {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Left => {} Self::Right => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8105pub enum PartitionRangeDirection {
8106 Left,
8107 Right,
8108}
8109
8110#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SqlOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
SqlOption::Clustered(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Clustered", &__self_0),
SqlOption::Ident(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Ident",
&__self_0),
SqlOption::KeyValue { key: __self_0, value: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"KeyValue", "key", __self_0, "value", &__self_1),
SqlOption::Partition {
column_name: __self_0,
range_direction: __self_1,
for_values: __self_2 } =>
::core::fmt::Formatter::debug_struct_field3_finish(f,
"Partition", "column_name", __self_0, "range_direction",
__self_1, "for_values", &__self_2),
SqlOption::Comment(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Comment", &__self_0),
SqlOption::TableSpace(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"TableSpace", &__self_0),
SqlOption::NamedParenthesizedList(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"NamedParenthesizedList", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SqlOption {
#[inline]
fn clone(&self) -> SqlOption {
match self {
SqlOption::Clustered(__self_0) =>
SqlOption::Clustered(::core::clone::Clone::clone(__self_0)),
SqlOption::Ident(__self_0) =>
SqlOption::Ident(::core::clone::Clone::clone(__self_0)),
SqlOption::KeyValue { key: __self_0, value: __self_1 } =>
SqlOption::KeyValue {
key: ::core::clone::Clone::clone(__self_0),
value: ::core::clone::Clone::clone(__self_1),
},
SqlOption::Partition {
column_name: __self_0,
range_direction: __self_1,
for_values: __self_2 } =>
SqlOption::Partition {
column_name: ::core::clone::Clone::clone(__self_0),
range_direction: ::core::clone::Clone::clone(__self_1),
for_values: ::core::clone::Clone::clone(__self_2),
},
SqlOption::Comment(__self_0) =>
SqlOption::Comment(::core::clone::Clone::clone(__self_0)),
SqlOption::TableSpace(__self_0) =>
SqlOption::TableSpace(::core::clone::Clone::clone(__self_0)),
SqlOption::NamedParenthesizedList(__self_0) =>
SqlOption::NamedParenthesizedList(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SqlOption {
#[inline]
fn eq(&self, other: &SqlOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(SqlOption::Clustered(__self_0),
SqlOption::Clustered(__arg1_0)) => __self_0 == __arg1_0,
(SqlOption::Ident(__self_0), SqlOption::Ident(__arg1_0)) =>
__self_0 == __arg1_0,
(SqlOption::KeyValue { key: __self_0, value: __self_1 },
SqlOption::KeyValue { key: __arg1_0, value: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(SqlOption::Partition {
column_name: __self_0,
range_direction: __self_1,
for_values: __self_2 }, SqlOption::Partition {
column_name: __arg1_0,
range_direction: __arg1_1,
for_values: __arg1_2 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1 &&
__self_2 == __arg1_2,
(SqlOption::Comment(__self_0), SqlOption::Comment(__arg1_0))
=> __self_0 == __arg1_0,
(SqlOption::TableSpace(__self_0),
SqlOption::TableSpace(__arg1_0)) => __self_0 == __arg1_0,
(SqlOption::NamedParenthesizedList(__self_0),
SqlOption::NamedParenthesizedList(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SqlOption {
#[inline]
fn partial_cmp(&self, other: &SqlOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(SqlOption::Clustered(__self_0), SqlOption::Clustered(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SqlOption::Ident(__self_0), SqlOption::Ident(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SqlOption::KeyValue { key: __self_0, value: __self_1 },
SqlOption::KeyValue { key: __arg1_0, value: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(SqlOption::Partition {
column_name: __self_0,
range_direction: __self_1,
for_values: __self_2 }, SqlOption::Partition {
column_name: __arg1_0,
range_direction: __arg1_1,
for_values: __arg1_2 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_1,
__arg1_1) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(SqlOption::Comment(__self_0), SqlOption::Comment(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SqlOption::TableSpace(__self_0), SqlOption::TableSpace(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SqlOption::NamedParenthesizedList(__self_0),
SqlOption::NamedParenthesizedList(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SqlOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<TableOptionsClustered>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<Option<PartitionRangeDirection>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
let _: ::core::cmp::AssertParamIsEq<CommentDef>;
let _: ::core::cmp::AssertParamIsEq<TablespaceOption>;
let _: ::core::cmp::AssertParamIsEq<NamedParenthesizedList>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SqlOption {
#[inline]
fn cmp(&self, other: &SqlOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(SqlOption::Clustered(__self_0),
SqlOption::Clustered(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SqlOption::Ident(__self_0), SqlOption::Ident(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SqlOption::KeyValue { key: __self_0, value: __self_1 },
SqlOption::KeyValue { key: __arg1_0, value: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(SqlOption::Partition {
column_name: __self_0,
range_direction: __self_1,
for_values: __self_2 }, SqlOption::Partition {
column_name: __arg1_0,
range_direction: __arg1_1,
for_values: __arg1_2 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_2, __arg1_2),
cmp => cmp,
},
cmp => cmp,
},
(SqlOption::Comment(__self_0), SqlOption::Comment(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SqlOption::TableSpace(__self_0),
SqlOption::TableSpace(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SqlOption::NamedParenthesizedList(__self_0),
SqlOption::NamedParenthesizedList(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SqlOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
SqlOption::Clustered(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SqlOption::Ident(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SqlOption::KeyValue { key: __self_0, value: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
SqlOption::Partition {
column_name: __self_0,
range_direction: __self_1,
for_values: __self_2 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state);
::core::hash::Hash::hash(__self_2, state)
}
SqlOption::Comment(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SqlOption::TableSpace(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SqlOption::NamedParenthesizedList(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8111#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8112#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SqlOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Clustered(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Ident(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::KeyValue { key, value } => {
sqlparser::ast::Visit::visit(key, visitor)?;
sqlparser::ast::Visit::visit(value, visitor)?;
}
Self::Partition { column_name, range_direction, for_values } => {
sqlparser::ast::Visit::visit(column_name, visitor)?;
sqlparser::ast::Visit::visit(range_direction, visitor)?;
sqlparser::ast::Visit::visit(for_values, visitor)?;
}
Self::Comment(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::TableSpace(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::NamedParenthesizedList(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SqlOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Clustered(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Ident(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::KeyValue { key, value } => {
sqlparser::ast::VisitMut::visit(key, visitor)?;
sqlparser::ast::VisitMut::visit(value, visitor)?;
}
Self::Partition { column_name, range_direction, for_values } => {
sqlparser::ast::VisitMut::visit(column_name, visitor)?;
sqlparser::ast::VisitMut::visit(range_direction, visitor)?;
sqlparser::ast::VisitMut::visit(for_values, visitor)?;
}
Self::Comment(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::TableSpace(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::NamedParenthesizedList(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8113pub enum SqlOption {
8114 Clustered(TableOptionsClustered),
8118 Ident(Ident),
8122 KeyValue { key: Ident, value: Expr },
8126 Partition {
8133 column_name: Ident,
8134 range_direction: Option<PartitionRangeDirection>,
8135 for_values: Vec<Expr>,
8136 },
8137 Comment(CommentDef),
8139 TableSpace(TablespaceOption),
8142 NamedParenthesizedList(NamedParenthesizedList),
8149}
8150
8151impl fmt::Display for SqlOption {
8152 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8153 match self {
8154 SqlOption::Clustered(c) => f.write_fmt(format_args!("{0}", c))write!(f, "{c}"),
8155 SqlOption::Ident(ident) => {
8156 f.write_fmt(format_args!("{0}", ident))write!(f, "{ident}")
8157 }
8158 SqlOption::KeyValue { key: name, value } => {
8159 f.write_fmt(format_args!("{0} = {1}", name, value))write!(f, "{name} = {value}")
8160 }
8161 SqlOption::Partition {
8162 column_name,
8163 range_direction,
8164 for_values,
8165 } => {
8166 let direction = match range_direction {
8167 Some(PartitionRangeDirection::Left) => " LEFT",
8168 Some(PartitionRangeDirection::Right) => " RIGHT",
8169 None => "",
8170 };
8171
8172 f.write_fmt(format_args!("PARTITION ({0} RANGE{1} FOR VALUES ({2}))",
column_name, direction, display_comma_separated(for_values)))write!(
8173 f,
8174 "PARTITION ({} RANGE{} FOR VALUES ({}))",
8175 column_name,
8176 direction,
8177 display_comma_separated(for_values)
8178 )
8179 }
8180 SqlOption::TableSpace(tablespace_option) => {
8181 f.write_fmt(format_args!("TABLESPACE {0}", tablespace_option.name))write!(f, "TABLESPACE {}", tablespace_option.name)?;
8182 match tablespace_option.storage {
8183 Some(StorageType::Disk) => f.write_fmt(format_args!(" STORAGE DISK"))write!(f, " STORAGE DISK"),
8184 Some(StorageType::Memory) => f.write_fmt(format_args!(" STORAGE MEMORY"))write!(f, " STORAGE MEMORY"),
8185 None => Ok(()),
8186 }
8187 }
8188 SqlOption::Comment(comment) => match comment {
8189 CommentDef::WithEq(comment) => {
8190 f.write_fmt(format_args!("COMMENT = \'{0}\'", comment))write!(f, "COMMENT = '{comment}'")
8191 }
8192 CommentDef::WithoutEq(comment) => {
8193 f.write_fmt(format_args!("COMMENT \'{0}\'", comment))write!(f, "COMMENT '{comment}'")
8194 }
8195 },
8196 SqlOption::NamedParenthesizedList(value) => {
8197 f.write_fmt(format_args!("{0} = ", value.key))write!(f, "{} = ", value.key)?;
8198 if let Some(key) = &value.name {
8199 f.write_fmt(format_args!("{0}", key))write!(f, "{key}")?;
8200 }
8201 if !value.values.is_empty() {
8202 f.write_fmt(format_args!("({0})", display_comma_separated(&value.values)))write!(f, "({})", display_comma_separated(&value.values))?
8203 }
8204 Ok(())
8205 }
8206 }
8207 }
8208}
8209
8210#[derive(#[automatically_derived]
impl ::core::fmt::Debug for StorageType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
StorageType::Disk => "Disk",
StorageType::Memory => "Memory",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for StorageType {
#[inline]
fn clone(&self) -> StorageType {
match self {
StorageType::Disk => StorageType::Disk,
StorageType::Memory => StorageType::Memory,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for StorageType {
#[inline]
fn eq(&self, other: &StorageType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for StorageType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for StorageType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash, #[automatically_derived]
impl ::core::cmp::PartialOrd for StorageType {
#[inline]
fn partial_cmp(&self, other: &StorageType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for StorageType {
#[inline]
fn cmp(&self, other: &StorageType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord)]
8211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8212#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for StorageType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Disk => {} Self::Memory => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for StorageType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Disk => {} Self::Memory => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8213pub enum StorageType {
8214 Disk,
8215 Memory,
8216}
8217
8218#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TablespaceOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"TablespaceOption", "name", &self.name, "storage", &&self.storage)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TablespaceOption {
#[inline]
fn clone(&self) -> TablespaceOption {
TablespaceOption {
name: ::core::clone::Clone::clone(&self.name),
storage: ::core::clone::Clone::clone(&self.storage),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TablespaceOption {
#[inline]
fn eq(&self, other: &TablespaceOption) -> bool {
self.name == other.name && self.storage == other.storage
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for TablespaceOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<Option<StorageType>>;
}
}Eq, #[automatically_derived]
impl ::core::hash::Hash for TablespaceOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.storage, state)
}
}Hash, #[automatically_derived]
impl ::core::cmp::PartialOrd for TablespaceOption {
#[inline]
fn partial_cmp(&self, other: &TablespaceOption)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.storage,
&other.storage),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for TablespaceOption {
#[inline]
fn cmp(&self, other: &TablespaceOption) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.storage, &other.storage),
cmp => cmp,
}
}
}Ord)]
8219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8220#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TablespaceOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.storage, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TablespaceOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.storage, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8221pub struct TablespaceOption {
8224 pub name: String,
8225 pub storage: Option<StorageType>,
8226}
8227
8228#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SecretOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "SecretOption",
"key", &self.key, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SecretOption {
#[inline]
fn clone(&self) -> SecretOption {
SecretOption {
key: ::core::clone::Clone::clone(&self.key),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SecretOption {
#[inline]
fn eq(&self, other: &SecretOption) -> bool {
self.key == other.key && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SecretOption {
#[inline]
fn partial_cmp(&self, other: &SecretOption)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.key, &other.key) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SecretOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SecretOption {
#[inline]
fn cmp(&self, other: &SecretOption) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.key, &other.key) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SecretOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.key, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
8229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8230#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SecretOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.key, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SecretOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.key, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8231pub struct SecretOption {
8232 pub key: Ident,
8233 pub value: Ident,
8234}
8235
8236impl fmt::Display for SecretOption {
8237 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8238 f.write_fmt(format_args!("{0} {1}", self.key, self.value))write!(f, "{} {}", self.key, self.value)
8239 }
8240}
8241
8242#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateServerStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
let names: &'static _ =
&["name", "if_not_exists", "server_type", "version",
"foreign_data_wrapper", "options"];
let values: &[&dyn ::core::fmt::Debug] =
&[&self.name, &self.if_not_exists, &self.server_type,
&self.version, &self.foreign_data_wrapper, &&self.options];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"CreateServerStatement", names, values)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateServerStatement {
#[inline]
fn clone(&self) -> CreateServerStatement {
CreateServerStatement {
name: ::core::clone::Clone::clone(&self.name),
if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
server_type: ::core::clone::Clone::clone(&self.server_type),
version: ::core::clone::Clone::clone(&self.version),
foreign_data_wrapper: ::core::clone::Clone::clone(&self.foreign_data_wrapper),
options: ::core::clone::Clone::clone(&self.options),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateServerStatement {
#[inline]
fn eq(&self, other: &CreateServerStatement) -> bool {
self.if_not_exists == other.if_not_exists && self.name == other.name
&& self.server_type == other.server_type &&
self.version == other.version &&
self.foreign_data_wrapper == other.foreign_data_wrapper &&
self.options == other.options
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateServerStatement {
#[inline]
fn partial_cmp(&self, other: &CreateServerStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
&other.if_not_exists) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.server_type,
&other.server_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.version,
&other.version) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.foreign_data_wrapper,
&other.foreign_data_wrapper) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.options,
&other.options),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateServerStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<CreateServerOption>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateServerStatement {
#[inline]
fn cmp(&self, other: &CreateServerStatement) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.if_not_exists,
&other.if_not_exists) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.server_type,
&other.server_type) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.version, &other.version) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.foreign_data_wrapper,
&other.foreign_data_wrapper) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.options, &other.options),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateServerStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.if_not_exists, state);
::core::hash::Hash::hash(&self.server_type, state);
::core::hash::Hash::hash(&self.version, state);
::core::hash::Hash::hash(&self.foreign_data_wrapper, state);
::core::hash::Hash::hash(&self.options, state)
}
}Hash)]
8246#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8247#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateServerStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(&self.server_type, visitor)?;
sqlparser::ast::Visit::visit(&self.version, visitor)?;
sqlparser::ast::Visit::visit(&self.foreign_data_wrapper, visitor)?;
sqlparser::ast::Visit::visit(&self.options, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateServerStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.server_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.version, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.foreign_data_wrapper,
visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.options, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8248pub struct CreateServerStatement {
8249 pub name: ObjectName,
8250 pub if_not_exists: bool,
8251 pub server_type: Option<Ident>,
8252 pub version: Option<Ident>,
8253 pub foreign_data_wrapper: ObjectName,
8254 pub options: Option<Vec<CreateServerOption>>,
8255}
8256
8257impl fmt::Display for CreateServerStatement {
8258 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8259 let CreateServerStatement {
8260 name,
8261 if_not_exists,
8262 server_type,
8263 version,
8264 foreign_data_wrapper,
8265 options,
8266 } = self;
8267
8268 f.write_fmt(format_args!("CREATE SERVER {0}{1} ",
if *if_not_exists { "IF NOT EXISTS " } else { "" }, name))write!(
8269 f,
8270 "CREATE SERVER {if_not_exists}{name} ",
8271 if_not_exists = if *if_not_exists { "IF NOT EXISTS " } else { "" },
8272 )?;
8273
8274 if let Some(st) = server_type {
8275 f.write_fmt(format_args!("TYPE {0} ", st))write!(f, "TYPE {st} ")?;
8276 }
8277
8278 if let Some(v) = version {
8279 f.write_fmt(format_args!("VERSION {0} ", v))write!(f, "VERSION {v} ")?;
8280 }
8281
8282 f.write_fmt(format_args!("FOREIGN DATA WRAPPER {0}", foreign_data_wrapper))write!(f, "FOREIGN DATA WRAPPER {foreign_data_wrapper}")?;
8283
8284 if let Some(o) = options {
8285 f.write_fmt(format_args!(" OPTIONS ({0})", display_comma_separated(o)))write!(f, " OPTIONS ({o})", o = display_comma_separated(o))?;
8286 }
8287
8288 Ok(())
8289 }
8290}
8291
8292#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateServerOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"CreateServerOption", "key", &self.key, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateServerOption {
#[inline]
fn clone(&self) -> CreateServerOption {
CreateServerOption {
key: ::core::clone::Clone::clone(&self.key),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateServerOption {
#[inline]
fn eq(&self, other: &CreateServerOption) -> bool {
self.key == other.key && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateServerOption {
#[inline]
fn partial_cmp(&self, other: &CreateServerOption)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.key, &other.key) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateServerOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateServerOption {
#[inline]
fn cmp(&self, other: &CreateServerOption) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.key, &other.key) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateServerOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.key, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
8293#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8294#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateServerOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.key, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateServerOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.key, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8295pub struct CreateServerOption {
8296 pub key: Ident,
8297 pub value: Ident,
8298}
8299
8300impl fmt::Display for CreateServerOption {
8301 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8302 f.write_fmt(format_args!("{0} {1}", self.key, self.value))write!(f, "{} {}", self.key, self.value)
8303 }
8304}
8305
8306#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AttachDuckDBDatabaseOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
AttachDuckDBDatabaseOption::ReadOnly(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ReadOnly", &__self_0),
AttachDuckDBDatabaseOption::Type(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Type",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AttachDuckDBDatabaseOption {
#[inline]
fn clone(&self) -> AttachDuckDBDatabaseOption {
match self {
AttachDuckDBDatabaseOption::ReadOnly(__self_0) =>
AttachDuckDBDatabaseOption::ReadOnly(::core::clone::Clone::clone(__self_0)),
AttachDuckDBDatabaseOption::Type(__self_0) =>
AttachDuckDBDatabaseOption::Type(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AttachDuckDBDatabaseOption {
#[inline]
fn eq(&self, other: &AttachDuckDBDatabaseOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(AttachDuckDBDatabaseOption::ReadOnly(__self_0),
AttachDuckDBDatabaseOption::ReadOnly(__arg1_0)) =>
__self_0 == __arg1_0,
(AttachDuckDBDatabaseOption::Type(__self_0),
AttachDuckDBDatabaseOption::Type(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AttachDuckDBDatabaseOption {
#[inline]
fn partial_cmp(&self, other: &AttachDuckDBDatabaseOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(AttachDuckDBDatabaseOption::ReadOnly(__self_0),
AttachDuckDBDatabaseOption::ReadOnly(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(AttachDuckDBDatabaseOption::Type(__self_0),
AttachDuckDBDatabaseOption::Type(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AttachDuckDBDatabaseOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AttachDuckDBDatabaseOption {
#[inline]
fn cmp(&self, other: &AttachDuckDBDatabaseOption)
-> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(AttachDuckDBDatabaseOption::ReadOnly(__self_0),
AttachDuckDBDatabaseOption::ReadOnly(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(AttachDuckDBDatabaseOption::Type(__self_0),
AttachDuckDBDatabaseOption::Type(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AttachDuckDBDatabaseOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
AttachDuckDBDatabaseOption::ReadOnly(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
AttachDuckDBDatabaseOption::Type(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8308#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AttachDuckDBDatabaseOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ReadOnly(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Type(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for AttachDuckDBDatabaseOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ReadOnly(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Type(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8309pub enum AttachDuckDBDatabaseOption {
8310 ReadOnly(Option<bool>),
8311 Type(Ident),
8312}
8313
8314impl fmt::Display for AttachDuckDBDatabaseOption {
8315 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8316 match self {
8317 AttachDuckDBDatabaseOption::ReadOnly(Some(true)) => f.write_fmt(format_args!("READ_ONLY true"))write!(f, "READ_ONLY true"),
8318 AttachDuckDBDatabaseOption::ReadOnly(Some(false)) => f.write_fmt(format_args!("READ_ONLY false"))write!(f, "READ_ONLY false"),
8319 AttachDuckDBDatabaseOption::ReadOnly(None) => f.write_fmt(format_args!("READ_ONLY"))write!(f, "READ_ONLY"),
8320 AttachDuckDBDatabaseOption::Type(t) => f.write_fmt(format_args!("TYPE {0}", t))write!(f, "TYPE {t}"),
8321 }
8322 }
8323}
8324
8325#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TransactionMode {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
TransactionMode::AccessMode(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AccessMode", &__self_0),
TransactionMode::IsolationLevel(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IsolationLevel", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for TransactionMode { }Copy, #[automatically_derived]
impl ::core::clone::Clone for TransactionMode {
#[inline]
fn clone(&self) -> TransactionMode {
let _: ::core::clone::AssertParamIsClone<TransactionAccessMode>;
let _: ::core::clone::AssertParamIsClone<TransactionIsolationLevel>;
*self
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TransactionMode {
#[inline]
fn eq(&self, other: &TransactionMode) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(TransactionMode::AccessMode(__self_0),
TransactionMode::AccessMode(__arg1_0)) =>
__self_0 == __arg1_0,
(TransactionMode::IsolationLevel(__self_0),
TransactionMode::IsolationLevel(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TransactionMode {
#[inline]
fn partial_cmp(&self, other: &TransactionMode)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(TransactionMode::AccessMode(__self_0),
TransactionMode::AccessMode(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(TransactionMode::IsolationLevel(__self_0),
TransactionMode::IsolationLevel(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TransactionMode {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<TransactionAccessMode>;
let _: ::core::cmp::AssertParamIsEq<TransactionIsolationLevel>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TransactionMode {
#[inline]
fn cmp(&self, other: &TransactionMode) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(TransactionMode::AccessMode(__self_0),
TransactionMode::AccessMode(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(TransactionMode::IsolationLevel(__self_0),
TransactionMode::IsolationLevel(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TransactionMode {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
TransactionMode::AccessMode(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
TransactionMode::IsolationLevel(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8327#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TransactionMode {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AccessMode(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IsolationLevel(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TransactionMode {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AccessMode(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IsolationLevel(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8328pub enum TransactionMode {
8329 AccessMode(TransactionAccessMode),
8330 IsolationLevel(TransactionIsolationLevel),
8331}
8332
8333impl fmt::Display for TransactionMode {
8334 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8335 use TransactionMode::*;
8336 match self {
8337 AccessMode(access_mode) => f.write_fmt(format_args!("{0}", access_mode))write!(f, "{access_mode}"),
8338 IsolationLevel(iso_level) => f.write_fmt(format_args!("ISOLATION LEVEL {0}", iso_level))write!(f, "ISOLATION LEVEL {iso_level}"),
8339 }
8340 }
8341}
8342
8343#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TransactionAccessMode {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
TransactionAccessMode::ReadOnly => "ReadOnly",
TransactionAccessMode::ReadWrite => "ReadWrite",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for TransactionAccessMode { }Copy, #[automatically_derived]
impl ::core::clone::Clone for TransactionAccessMode {
#[inline]
fn clone(&self) -> TransactionAccessMode { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TransactionAccessMode {
#[inline]
fn eq(&self, other: &TransactionAccessMode) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TransactionAccessMode {
#[inline]
fn partial_cmp(&self, other: &TransactionAccessMode)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TransactionAccessMode {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TransactionAccessMode {
#[inline]
fn cmp(&self, other: &TransactionAccessMode) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TransactionAccessMode {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8345#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TransactionAccessMode {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::ReadOnly => {} Self::ReadWrite => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TransactionAccessMode {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::ReadOnly => {} Self::ReadWrite => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8346pub enum TransactionAccessMode {
8347 ReadOnly,
8348 ReadWrite,
8349}
8350
8351impl fmt::Display for TransactionAccessMode {
8352 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8353 use TransactionAccessMode::*;
8354 f.write_str(match self {
8355 ReadOnly => "READ ONLY",
8356 ReadWrite => "READ WRITE",
8357 })
8358 }
8359}
8360
8361#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TransactionIsolationLevel {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
TransactionIsolationLevel::ReadUncommitted =>
"ReadUncommitted",
TransactionIsolationLevel::ReadCommitted => "ReadCommitted",
TransactionIsolationLevel::RepeatableRead => "RepeatableRead",
TransactionIsolationLevel::Serializable => "Serializable",
TransactionIsolationLevel::Snapshot => "Snapshot",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for TransactionIsolationLevel { }Copy, #[automatically_derived]
impl ::core::clone::Clone for TransactionIsolationLevel {
#[inline]
fn clone(&self) -> TransactionIsolationLevel { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TransactionIsolationLevel {
#[inline]
fn eq(&self, other: &TransactionIsolationLevel) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TransactionIsolationLevel {
#[inline]
fn partial_cmp(&self, other: &TransactionIsolationLevel)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TransactionIsolationLevel {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TransactionIsolationLevel {
#[inline]
fn cmp(&self, other: &TransactionIsolationLevel)
-> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TransactionIsolationLevel {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8362#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8363#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TransactionIsolationLevel {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ReadUncommitted => {}
Self::ReadCommitted => {}
Self::RepeatableRead => {}
Self::Serializable => {}
Self::Snapshot => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TransactionIsolationLevel {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ReadUncommitted => {}
Self::ReadCommitted => {}
Self::RepeatableRead => {}
Self::Serializable => {}
Self::Snapshot => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8364pub enum TransactionIsolationLevel {
8365 ReadUncommitted,
8366 ReadCommitted,
8367 RepeatableRead,
8368 Serializable,
8369 Snapshot,
8370}
8371
8372impl fmt::Display for TransactionIsolationLevel {
8373 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8374 use TransactionIsolationLevel::*;
8375 f.write_str(match self {
8376 ReadUncommitted => "READ UNCOMMITTED",
8377 ReadCommitted => "READ COMMITTED",
8378 RepeatableRead => "REPEATABLE READ",
8379 Serializable => "SERIALIZABLE",
8380 Snapshot => "SNAPSHOT",
8381 })
8382 }
8383}
8384
8385#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TransactionModifier {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
TransactionModifier::Deferred => "Deferred",
TransactionModifier::Immediate => "Immediate",
TransactionModifier::Exclusive => "Exclusive",
TransactionModifier::Try => "Try",
TransactionModifier::Catch => "Catch",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for TransactionModifier { }Copy, #[automatically_derived]
impl ::core::clone::Clone for TransactionModifier {
#[inline]
fn clone(&self) -> TransactionModifier { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TransactionModifier {
#[inline]
fn eq(&self, other: &TransactionModifier) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TransactionModifier {
#[inline]
fn partial_cmp(&self, other: &TransactionModifier)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TransactionModifier {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TransactionModifier {
#[inline]
fn cmp(&self, other: &TransactionModifier) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TransactionModifier {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8391#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TransactionModifier {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Deferred => {}
Self::Immediate => {}
Self::Exclusive => {}
Self::Try => {}
Self::Catch => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TransactionModifier {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Deferred => {}
Self::Immediate => {}
Self::Exclusive => {}
Self::Try => {}
Self::Catch => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8392pub enum TransactionModifier {
8393 Deferred,
8394 Immediate,
8395 Exclusive,
8396 Try,
8397 Catch,
8398}
8399
8400impl fmt::Display for TransactionModifier {
8401 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8402 use TransactionModifier::*;
8403 f.write_str(match self {
8404 Deferred => "DEFERRED",
8405 Immediate => "IMMEDIATE",
8406 Exclusive => "EXCLUSIVE",
8407 Try => "TRY",
8408 Catch => "CATCH",
8409 })
8410 }
8411}
8412
8413#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowStatementFilter {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ShowStatementFilter::Like(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Like",
&__self_0),
ShowStatementFilter::ILike(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "ILike",
&__self_0),
ShowStatementFilter::Where(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Where",
&__self_0),
ShowStatementFilter::NoKeyword(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"NoKeyword", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowStatementFilter {
#[inline]
fn clone(&self) -> ShowStatementFilter {
match self {
ShowStatementFilter::Like(__self_0) =>
ShowStatementFilter::Like(::core::clone::Clone::clone(__self_0)),
ShowStatementFilter::ILike(__self_0) =>
ShowStatementFilter::ILike(::core::clone::Clone::clone(__self_0)),
ShowStatementFilter::Where(__self_0) =>
ShowStatementFilter::Where(::core::clone::Clone::clone(__self_0)),
ShowStatementFilter::NoKeyword(__self_0) =>
ShowStatementFilter::NoKeyword(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowStatementFilter {
#[inline]
fn eq(&self, other: &ShowStatementFilter) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(ShowStatementFilter::Like(__self_0),
ShowStatementFilter::Like(__arg1_0)) =>
__self_0 == __arg1_0,
(ShowStatementFilter::ILike(__self_0),
ShowStatementFilter::ILike(__arg1_0)) =>
__self_0 == __arg1_0,
(ShowStatementFilter::Where(__self_0),
ShowStatementFilter::Where(__arg1_0)) =>
__self_0 == __arg1_0,
(ShowStatementFilter::NoKeyword(__self_0),
ShowStatementFilter::NoKeyword(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowStatementFilter {
#[inline]
fn partial_cmp(&self, other: &ShowStatementFilter)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(ShowStatementFilter::Like(__self_0),
ShowStatementFilter::Like(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ShowStatementFilter::ILike(__self_0),
ShowStatementFilter::ILike(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ShowStatementFilter::Where(__self_0),
ShowStatementFilter::Where(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ShowStatementFilter::NoKeyword(__self_0),
ShowStatementFilter::NoKeyword(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowStatementFilter {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowStatementFilter {
#[inline]
fn cmp(&self, other: &ShowStatementFilter) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(ShowStatementFilter::Like(__self_0),
ShowStatementFilter::Like(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ShowStatementFilter::ILike(__self_0),
ShowStatementFilter::ILike(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ShowStatementFilter::Where(__self_0),
ShowStatementFilter::Where(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ShowStatementFilter::NoKeyword(__self_0),
ShowStatementFilter::NoKeyword(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowStatementFilter {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
ShowStatementFilter::Like(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
ShowStatementFilter::ILike(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
ShowStatementFilter::Where(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
ShowStatementFilter::NoKeyword(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8415#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowStatementFilter {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Like(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::ILike(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Where(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::NoKeyword(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowStatementFilter {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Like(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ILike(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Where(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::NoKeyword(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8416pub enum ShowStatementFilter {
8417 Like(String),
8418 ILike(String),
8419 Where(Expr),
8420 NoKeyword(String),
8421}
8422
8423impl fmt::Display for ShowStatementFilter {
8424 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8425 use ShowStatementFilter::*;
8426 match self {
8427 Like(pattern) => f.write_fmt(format_args!("LIKE \'{0}\'",
value::escape_single_quote_string(pattern)))write!(f, "LIKE '{}'", value::escape_single_quote_string(pattern)),
8428 ILike(pattern) => f.write_fmt(format_args!("ILIKE {0}",
value::escape_single_quote_string(pattern)))write!(f, "ILIKE {}", value::escape_single_quote_string(pattern)),
8429 Where(expr) => f.write_fmt(format_args!("WHERE {0}", expr))write!(f, "WHERE {expr}"),
8430 NoKeyword(pattern) => f.write_fmt(format_args!("\'{0}\'",
value::escape_single_quote_string(pattern)))write!(f, "'{}'", value::escape_single_quote_string(pattern)),
8431 }
8432 }
8433}
8434
8435#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowStatementInClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ShowStatementInClause::IN => "IN",
ShowStatementInClause::FROM => "FROM",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowStatementInClause {
#[inline]
fn clone(&self) -> ShowStatementInClause {
match self {
ShowStatementInClause::IN => ShowStatementInClause::IN,
ShowStatementInClause::FROM => ShowStatementInClause::FROM,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowStatementInClause {
#[inline]
fn eq(&self, other: &ShowStatementInClause) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowStatementInClause {
#[inline]
fn partial_cmp(&self, other: &ShowStatementInClause)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowStatementInClause {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowStatementInClause {
#[inline]
fn cmp(&self, other: &ShowStatementInClause) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowStatementInClause {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8437#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowStatementInClause {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::IN => {} Self::FROM => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowStatementInClause {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::IN => {} Self::FROM => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8438pub enum ShowStatementInClause {
8439 IN,
8440 FROM,
8441}
8442
8443impl fmt::Display for ShowStatementInClause {
8444 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8445 use ShowStatementInClause::*;
8446 match self {
8447 FROM => f.write_fmt(format_args!("FROM"))write!(f, "FROM"),
8448 IN => f.write_fmt(format_args!("IN"))write!(f, "IN"),
8449 }
8450 }
8451}
8452
8453#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SqliteOnConflict {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
SqliteOnConflict::Rollback => "Rollback",
SqliteOnConflict::Abort => "Abort",
SqliteOnConflict::Fail => "Fail",
SqliteOnConflict::Ignore => "Ignore",
SqliteOnConflict::Replace => "Replace",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for SqliteOnConflict { }Copy, #[automatically_derived]
impl ::core::clone::Clone for SqliteOnConflict {
#[inline]
fn clone(&self) -> SqliteOnConflict { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SqliteOnConflict {
#[inline]
fn eq(&self, other: &SqliteOnConflict) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SqliteOnConflict {
#[inline]
fn partial_cmp(&self, other: &SqliteOnConflict)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SqliteOnConflict {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SqliteOnConflict {
#[inline]
fn cmp(&self, other: &SqliteOnConflict) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SqliteOnConflict {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8459#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SqliteOnConflict {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Rollback => {}
Self::Abort => {}
Self::Fail => {}
Self::Ignore => {}
Self::Replace => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SqliteOnConflict {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Rollback => {}
Self::Abort => {}
Self::Fail => {}
Self::Ignore => {}
Self::Replace => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8460pub enum SqliteOnConflict {
8461 Rollback,
8462 Abort,
8463 Fail,
8464 Ignore,
8465 Replace,
8466}
8467
8468impl fmt::Display for SqliteOnConflict {
8469 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8470 use SqliteOnConflict::*;
8471 match self {
8472 Rollback => f.write_fmt(format_args!("OR ROLLBACK"))write!(f, "OR ROLLBACK"),
8473 Abort => f.write_fmt(format_args!("OR ABORT"))write!(f, "OR ABORT"),
8474 Fail => f.write_fmt(format_args!("OR FAIL"))write!(f, "OR FAIL"),
8475 Ignore => f.write_fmt(format_args!("OR IGNORE"))write!(f, "OR IGNORE"),
8476 Replace => f.write_fmt(format_args!("OR REPLACE"))write!(f, "OR REPLACE"),
8477 }
8478 }
8479}
8480
8481#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MysqlInsertPriority {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
MysqlInsertPriority::LowPriority => "LowPriority",
MysqlInsertPriority::Delayed => "Delayed",
MysqlInsertPriority::HighPriority => "HighPriority",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for MysqlInsertPriority { }Copy, #[automatically_derived]
impl ::core::clone::Clone for MysqlInsertPriority {
#[inline]
fn clone(&self) -> MysqlInsertPriority { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MysqlInsertPriority {
#[inline]
fn eq(&self, other: &MysqlInsertPriority) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MysqlInsertPriority {
#[inline]
fn partial_cmp(&self, other: &MysqlInsertPriority)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MysqlInsertPriority {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MysqlInsertPriority {
#[inline]
fn cmp(&self, other: &MysqlInsertPriority) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MysqlInsertPriority {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8488#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MysqlInsertPriority {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::LowPriority => {}
Self::Delayed => {}
Self::HighPriority => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MysqlInsertPriority {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::LowPriority => {}
Self::Delayed => {}
Self::HighPriority => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8489pub enum MysqlInsertPriority {
8490 LowPriority,
8491 Delayed,
8492 HighPriority,
8493}
8494
8495impl fmt::Display for crate::ast::MysqlInsertPriority {
8496 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8497 use MysqlInsertPriority::*;
8498 match self {
8499 LowPriority => f.write_fmt(format_args!("LOW_PRIORITY"))write!(f, "LOW_PRIORITY"),
8500 Delayed => f.write_fmt(format_args!("DELAYED"))write!(f, "DELAYED"),
8501 HighPriority => f.write_fmt(format_args!("HIGH_PRIORITY"))write!(f, "HIGH_PRIORITY"),
8502 }
8503 }
8504}
8505
8506#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CopySource {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CopySource::Table { table_name: __self_0, columns: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f, "Table",
"table_name", __self_0, "columns", &__self_1),
CopySource::Query(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Query",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CopySource {
#[inline]
fn clone(&self) -> CopySource {
match self {
CopySource::Table { table_name: __self_0, columns: __self_1 } =>
CopySource::Table {
table_name: ::core::clone::Clone::clone(__self_0),
columns: ::core::clone::Clone::clone(__self_1),
},
CopySource::Query(__self_0) =>
CopySource::Query(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CopySource {
#[inline]
fn eq(&self, other: &CopySource) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CopySource::Table { table_name: __self_0, columns: __self_1
}, CopySource::Table {
table_name: __arg1_0, columns: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(CopySource::Query(__self_0), CopySource::Query(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CopySource {
#[inline]
fn partial_cmp(&self, other: &CopySource)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CopySource::Table { table_name: __self_0, columns: __self_1 },
CopySource::Table { table_name: __arg1_0, columns: __arg1_1 })
=>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(CopySource::Query(__self_0), CopySource::Query(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CopySource {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CopySource {
#[inline]
fn cmp(&self, other: &CopySource) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CopySource::Table { table_name: __self_0, columns: __self_1
}, CopySource::Table {
table_name: __arg1_0, columns: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(CopySource::Query(__self_0), CopySource::Query(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CopySource {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CopySource::Table { table_name: __self_0, columns: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
CopySource::Query(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8508#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CopySource {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Table { table_name, columns } => {
sqlparser::ast::Visit::visit(table_name, visitor)?;
sqlparser::ast::Visit::visit(columns, visitor)?;
}
Self::Query(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CopySource {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Table { table_name, columns } => {
sqlparser::ast::VisitMut::visit(table_name, visitor)?;
sqlparser::ast::VisitMut::visit(columns, visitor)?;
}
Self::Query(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8509pub enum CopySource {
8510 Table {
8511 table_name: ObjectName,
8513 columns: Vec<Ident>,
8516 },
8517 Query(Box<Query>),
8518}
8519
8520#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CopyTarget {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CopyTarget::Stdin =>
::core::fmt::Formatter::write_str(f, "Stdin"),
CopyTarget::Stdout =>
::core::fmt::Formatter::write_str(f, "Stdout"),
CopyTarget::File { filename: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "File",
"filename", &__self_0),
CopyTarget::Program { command: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Program", "command", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CopyTarget {
#[inline]
fn clone(&self) -> CopyTarget {
match self {
CopyTarget::Stdin => CopyTarget::Stdin,
CopyTarget::Stdout => CopyTarget::Stdout,
CopyTarget::File { filename: __self_0 } =>
CopyTarget::File {
filename: ::core::clone::Clone::clone(__self_0),
},
CopyTarget::Program { command: __self_0 } =>
CopyTarget::Program {
command: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CopyTarget {
#[inline]
fn eq(&self, other: &CopyTarget) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CopyTarget::File { filename: __self_0 }, CopyTarget::File {
filename: __arg1_0 }) => __self_0 == __arg1_0,
(CopyTarget::Program { command: __self_0 },
CopyTarget::Program { command: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CopyTarget {
#[inline]
fn partial_cmp(&self, other: &CopyTarget)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CopyTarget::File { filename: __self_0 }, CopyTarget::File {
filename: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyTarget::Program { command: __self_0 }, CopyTarget::Program {
command: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CopyTarget {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CopyTarget {
#[inline]
fn cmp(&self, other: &CopyTarget) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CopyTarget::File { filename: __self_0 }, CopyTarget::File {
filename: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyTarget::Program { command: __self_0 },
CopyTarget::Program { command: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CopyTarget {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CopyTarget::File { filename: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
CopyTarget::Program { command: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
8521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8522#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CopyTarget {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Stdin => {}
Self::Stdout => {}
Self::File { filename } => {
sqlparser::ast::Visit::visit(filename, visitor)?;
}
Self::Program { command } => {
sqlparser::ast::Visit::visit(command, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CopyTarget {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Stdin => {}
Self::Stdout => {}
Self::File { filename } => {
sqlparser::ast::VisitMut::visit(filename, visitor)?;
}
Self::Program { command } => {
sqlparser::ast::VisitMut::visit(command, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8523pub enum CopyTarget {
8524 Stdin,
8525 Stdout,
8526 File {
8527 filename: String,
8529 },
8530 Program {
8531 command: String,
8533 },
8534}
8535
8536impl fmt::Display for CopyTarget {
8537 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8538 use CopyTarget::*;
8539 match self {
8540 Stdin => f.write_fmt(format_args!("STDIN"))write!(f, "STDIN"),
8541 Stdout => f.write_fmt(format_args!("STDOUT"))write!(f, "STDOUT"),
8542 File { filename } => f.write_fmt(format_args!("\'{0}\'",
value::escape_single_quote_string(filename)))write!(f, "'{}'", value::escape_single_quote_string(filename)),
8543 Program { command } => f.write_fmt(format_args!("PROGRAM \'{0}\'",
value::escape_single_quote_string(command)))write!(
8544 f,
8545 "PROGRAM '{}'",
8546 value::escape_single_quote_string(command)
8547 ),
8548 }
8549 }
8550}
8551
8552#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OnCommit {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
OnCommit::DeleteRows => "DeleteRows",
OnCommit::PreserveRows => "PreserveRows",
OnCommit::Drop => "Drop",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for OnCommit { }Copy, #[automatically_derived]
impl ::core::clone::Clone for OnCommit {
#[inline]
fn clone(&self) -> OnCommit { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OnCommit {
#[inline]
fn eq(&self, other: &OnCommit) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OnCommit {
#[inline]
fn partial_cmp(&self, other: &OnCommit)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OnCommit {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OnCommit {
#[inline]
fn cmp(&self, other: &OnCommit) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OnCommit {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8554#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OnCommit {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DeleteRows => {}
Self::PreserveRows => {}
Self::Drop => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OnCommit {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::DeleteRows => {}
Self::PreserveRows => {}
Self::Drop => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8555pub enum OnCommit {
8556 DeleteRows,
8557 PreserveRows,
8558 Drop,
8559}
8560
8561#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CopyOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CopyOption::Format(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Format",
&__self_0),
CopyOption::Freeze(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Freeze",
&__self_0),
CopyOption::Delimiter(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Delimiter", &__self_0),
CopyOption::Null(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Null",
&__self_0),
CopyOption::Header(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Header",
&__self_0),
CopyOption::Quote(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Quote",
&__self_0),
CopyOption::Escape(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Escape",
&__self_0),
CopyOption::ForceQuote(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ForceQuote", &__self_0),
CopyOption::ForceNotNull(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ForceNotNull", &__self_0),
CopyOption::ForceNull(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ForceNull", &__self_0),
CopyOption::Encoding(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Encoding", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CopyOption {
#[inline]
fn clone(&self) -> CopyOption {
match self {
CopyOption::Format(__self_0) =>
CopyOption::Format(::core::clone::Clone::clone(__self_0)),
CopyOption::Freeze(__self_0) =>
CopyOption::Freeze(::core::clone::Clone::clone(__self_0)),
CopyOption::Delimiter(__self_0) =>
CopyOption::Delimiter(::core::clone::Clone::clone(__self_0)),
CopyOption::Null(__self_0) =>
CopyOption::Null(::core::clone::Clone::clone(__self_0)),
CopyOption::Header(__self_0) =>
CopyOption::Header(::core::clone::Clone::clone(__self_0)),
CopyOption::Quote(__self_0) =>
CopyOption::Quote(::core::clone::Clone::clone(__self_0)),
CopyOption::Escape(__self_0) =>
CopyOption::Escape(::core::clone::Clone::clone(__self_0)),
CopyOption::ForceQuote(__self_0) =>
CopyOption::ForceQuote(::core::clone::Clone::clone(__self_0)),
CopyOption::ForceNotNull(__self_0) =>
CopyOption::ForceNotNull(::core::clone::Clone::clone(__self_0)),
CopyOption::ForceNull(__self_0) =>
CopyOption::ForceNull(::core::clone::Clone::clone(__self_0)),
CopyOption::Encoding(__self_0) =>
CopyOption::Encoding(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CopyOption {
#[inline]
fn eq(&self, other: &CopyOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CopyOption::Format(__self_0), CopyOption::Format(__arg1_0))
=> __self_0 == __arg1_0,
(CopyOption::Freeze(__self_0), CopyOption::Freeze(__arg1_0))
=> __self_0 == __arg1_0,
(CopyOption::Delimiter(__self_0),
CopyOption::Delimiter(__arg1_0)) => __self_0 == __arg1_0,
(CopyOption::Null(__self_0), CopyOption::Null(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyOption::Header(__self_0), CopyOption::Header(__arg1_0))
=> __self_0 == __arg1_0,
(CopyOption::Quote(__self_0), CopyOption::Quote(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyOption::Escape(__self_0), CopyOption::Escape(__arg1_0))
=> __self_0 == __arg1_0,
(CopyOption::ForceQuote(__self_0),
CopyOption::ForceQuote(__arg1_0)) => __self_0 == __arg1_0,
(CopyOption::ForceNotNull(__self_0),
CopyOption::ForceNotNull(__arg1_0)) => __self_0 == __arg1_0,
(CopyOption::ForceNull(__self_0),
CopyOption::ForceNull(__arg1_0)) => __self_0 == __arg1_0,
(CopyOption::Encoding(__self_0),
CopyOption::Encoding(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CopyOption {
#[inline]
fn partial_cmp(&self, other: &CopyOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CopyOption::Format(__self_0), CopyOption::Format(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Freeze(__self_0), CopyOption::Freeze(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Delimiter(__self_0), CopyOption::Delimiter(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Null(__self_0), CopyOption::Null(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Header(__self_0), CopyOption::Header(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Quote(__self_0), CopyOption::Quote(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Escape(__self_0), CopyOption::Escape(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::ForceQuote(__self_0),
CopyOption::ForceQuote(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::ForceNotNull(__self_0),
CopyOption::ForceNotNull(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::ForceNull(__self_0), CopyOption::ForceNull(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyOption::Encoding(__self_0), CopyOption::Encoding(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CopyOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<char>;
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CopyOption {
#[inline]
fn cmp(&self, other: &CopyOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CopyOption::Format(__self_0), CopyOption::Format(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Freeze(__self_0), CopyOption::Freeze(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Delimiter(__self_0),
CopyOption::Delimiter(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Null(__self_0), CopyOption::Null(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Header(__self_0), CopyOption::Header(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Quote(__self_0), CopyOption::Quote(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Escape(__self_0), CopyOption::Escape(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::ForceQuote(__self_0),
CopyOption::ForceQuote(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::ForceNotNull(__self_0),
CopyOption::ForceNotNull(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::ForceNull(__self_0),
CopyOption::ForceNull(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyOption::Encoding(__self_0),
CopyOption::Encoding(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CopyOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CopyOption::Format(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Freeze(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Delimiter(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Null(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Header(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Quote(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Escape(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::ForceQuote(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::ForceNotNull(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::ForceNull(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyOption::Encoding(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
8565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8566#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CopyOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Format(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Freeze(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Delimiter(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Null(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Header(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Quote(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Escape(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ForceQuote(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ForceNotNull(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ForceNull(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Encoding(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CopyOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Format(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Freeze(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Delimiter(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Null(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Header(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Quote(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Escape(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ForceQuote(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ForceNotNull(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ForceNull(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Encoding(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8567pub enum CopyOption {
8568 Format(Ident),
8570 Freeze(bool),
8572 Delimiter(char),
8574 Null(String),
8576 Header(bool),
8578 Quote(char),
8580 Escape(char),
8582 ForceQuote(Vec<Ident>),
8584 ForceNotNull(Vec<Ident>),
8586 ForceNull(Vec<Ident>),
8588 Encoding(String),
8590}
8591
8592impl fmt::Display for CopyOption {
8593 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8594 use CopyOption::*;
8595 match self {
8596 Format(name) => f.write_fmt(format_args!("FORMAT {0}", name))write!(f, "FORMAT {name}"),
8597 Freeze(true) => f.write_fmt(format_args!("FREEZE"))write!(f, "FREEZE"),
8598 Freeze(false) => f.write_fmt(format_args!("FREEZE FALSE"))write!(f, "FREEZE FALSE"),
8599 Delimiter(char) => f.write_fmt(format_args!("DELIMITER \'{0}\'", char))write!(f, "DELIMITER '{char}'"),
8600 Null(string) => f.write_fmt(format_args!("NULL \'{0}\'",
value::escape_single_quote_string(string)))write!(f, "NULL '{}'", value::escape_single_quote_string(string)),
8601 Header(true) => f.write_fmt(format_args!("HEADER"))write!(f, "HEADER"),
8602 Header(false) => f.write_fmt(format_args!("HEADER FALSE"))write!(f, "HEADER FALSE"),
8603 Quote(char) => f.write_fmt(format_args!("QUOTE \'{0}\'", char))write!(f, "QUOTE '{char}'"),
8604 Escape(char) => f.write_fmt(format_args!("ESCAPE \'{0}\'", char))write!(f, "ESCAPE '{char}'"),
8605 ForceQuote(columns) => f.write_fmt(format_args!("FORCE_QUOTE ({0})",
display_comma_separated(columns)))write!(f, "FORCE_QUOTE ({})", display_comma_separated(columns)),
8606 ForceNotNull(columns) => {
8607 f.write_fmt(format_args!("FORCE_NOT_NULL ({0})",
display_comma_separated(columns)))write!(f, "FORCE_NOT_NULL ({})", display_comma_separated(columns))
8608 }
8609 ForceNull(columns) => f.write_fmt(format_args!("FORCE_NULL ({0})",
display_comma_separated(columns)))write!(f, "FORCE_NULL ({})", display_comma_separated(columns)),
8610 Encoding(name) => f.write_fmt(format_args!("ENCODING \'{0}\'",
value::escape_single_quote_string(name)))write!(f, "ENCODING '{}'", value::escape_single_quote_string(name)),
8611 }
8612 }
8613}
8614
8615#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CopyLegacyOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CopyLegacyOption::AcceptAnyDate =>
::core::fmt::Formatter::write_str(f, "AcceptAnyDate"),
CopyLegacyOption::AcceptInvChars(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AcceptInvChars", &__self_0),
CopyLegacyOption::AddQuotes =>
::core::fmt::Formatter::write_str(f, "AddQuotes"),
CopyLegacyOption::AllowOverwrite =>
::core::fmt::Formatter::write_str(f, "AllowOverwrite"),
CopyLegacyOption::Binary =>
::core::fmt::Formatter::write_str(f, "Binary"),
CopyLegacyOption::BlankAsNull =>
::core::fmt::Formatter::write_str(f, "BlankAsNull"),
CopyLegacyOption::Bzip2 =>
::core::fmt::Formatter::write_str(f, "Bzip2"),
CopyLegacyOption::CleanPath =>
::core::fmt::Formatter::write_str(f, "CleanPath"),
CopyLegacyOption::Csv(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Csv",
&__self_0),
CopyLegacyOption::DateFormat(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"DateFormat", &__self_0),
CopyLegacyOption::Delimiter(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Delimiter", &__self_0),
CopyLegacyOption::EmptyAsNull =>
::core::fmt::Formatter::write_str(f, "EmptyAsNull"),
CopyLegacyOption::Encrypted { auto: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Encrypted", "auto", &__self_0),
CopyLegacyOption::Escape =>
::core::fmt::Formatter::write_str(f, "Escape"),
CopyLegacyOption::Extension(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Extension", &__self_0),
CopyLegacyOption::FixedWidth(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"FixedWidth", &__self_0),
CopyLegacyOption::Gzip =>
::core::fmt::Formatter::write_str(f, "Gzip"),
CopyLegacyOption::Header =>
::core::fmt::Formatter::write_str(f, "Header"),
CopyLegacyOption::IamRole(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IamRole", &__self_0),
CopyLegacyOption::IgnoreHeader(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IgnoreHeader", &__self_0),
CopyLegacyOption::Json =>
::core::fmt::Formatter::write_str(f, "Json"),
CopyLegacyOption::Manifest { verbose: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Manifest", "verbose", &__self_0),
CopyLegacyOption::MaxFileSize(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"MaxFileSize", &__self_0),
CopyLegacyOption::Null(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Null",
&__self_0),
CopyLegacyOption::Parallel(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Parallel", &__self_0),
CopyLegacyOption::Parquet =>
::core::fmt::Formatter::write_str(f, "Parquet"),
CopyLegacyOption::PartitionBy(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"PartitionBy", &__self_0),
CopyLegacyOption::Region(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Region",
&__self_0),
CopyLegacyOption::RowGroupSize(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"RowGroupSize", &__self_0),
CopyLegacyOption::TimeFormat(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"TimeFormat", &__self_0),
CopyLegacyOption::TruncateColumns =>
::core::fmt::Formatter::write_str(f, "TruncateColumns"),
CopyLegacyOption::Zstd =>
::core::fmt::Formatter::write_str(f, "Zstd"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CopyLegacyOption {
#[inline]
fn clone(&self) -> CopyLegacyOption {
match self {
CopyLegacyOption::AcceptAnyDate =>
CopyLegacyOption::AcceptAnyDate,
CopyLegacyOption::AcceptInvChars(__self_0) =>
CopyLegacyOption::AcceptInvChars(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::AddQuotes => CopyLegacyOption::AddQuotes,
CopyLegacyOption::AllowOverwrite =>
CopyLegacyOption::AllowOverwrite,
CopyLegacyOption::Binary => CopyLegacyOption::Binary,
CopyLegacyOption::BlankAsNull => CopyLegacyOption::BlankAsNull,
CopyLegacyOption::Bzip2 => CopyLegacyOption::Bzip2,
CopyLegacyOption::CleanPath => CopyLegacyOption::CleanPath,
CopyLegacyOption::Csv(__self_0) =>
CopyLegacyOption::Csv(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::DateFormat(__self_0) =>
CopyLegacyOption::DateFormat(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Delimiter(__self_0) =>
CopyLegacyOption::Delimiter(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::EmptyAsNull => CopyLegacyOption::EmptyAsNull,
CopyLegacyOption::Encrypted { auto: __self_0 } =>
CopyLegacyOption::Encrypted {
auto: ::core::clone::Clone::clone(__self_0),
},
CopyLegacyOption::Escape => CopyLegacyOption::Escape,
CopyLegacyOption::Extension(__self_0) =>
CopyLegacyOption::Extension(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::FixedWidth(__self_0) =>
CopyLegacyOption::FixedWidth(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Gzip => CopyLegacyOption::Gzip,
CopyLegacyOption::Header => CopyLegacyOption::Header,
CopyLegacyOption::IamRole(__self_0) =>
CopyLegacyOption::IamRole(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::IgnoreHeader(__self_0) =>
CopyLegacyOption::IgnoreHeader(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Json => CopyLegacyOption::Json,
CopyLegacyOption::Manifest { verbose: __self_0 } =>
CopyLegacyOption::Manifest {
verbose: ::core::clone::Clone::clone(__self_0),
},
CopyLegacyOption::MaxFileSize(__self_0) =>
CopyLegacyOption::MaxFileSize(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Null(__self_0) =>
CopyLegacyOption::Null(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Parallel(__self_0) =>
CopyLegacyOption::Parallel(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Parquet => CopyLegacyOption::Parquet,
CopyLegacyOption::PartitionBy(__self_0) =>
CopyLegacyOption::PartitionBy(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::Region(__self_0) =>
CopyLegacyOption::Region(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::RowGroupSize(__self_0) =>
CopyLegacyOption::RowGroupSize(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::TimeFormat(__self_0) =>
CopyLegacyOption::TimeFormat(::core::clone::Clone::clone(__self_0)),
CopyLegacyOption::TruncateColumns =>
CopyLegacyOption::TruncateColumns,
CopyLegacyOption::Zstd => CopyLegacyOption::Zstd,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CopyLegacyOption {
#[inline]
fn eq(&self, other: &CopyLegacyOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CopyLegacyOption::AcceptInvChars(__self_0),
CopyLegacyOption::AcceptInvChars(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Csv(__self_0),
CopyLegacyOption::Csv(__arg1_0)) => __self_0 == __arg1_0,
(CopyLegacyOption::DateFormat(__self_0),
CopyLegacyOption::DateFormat(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Delimiter(__self_0),
CopyLegacyOption::Delimiter(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Encrypted { auto: __self_0 },
CopyLegacyOption::Encrypted { auto: __arg1_0 }) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Extension(__self_0),
CopyLegacyOption::Extension(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::FixedWidth(__self_0),
CopyLegacyOption::FixedWidth(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::IamRole(__self_0),
CopyLegacyOption::IamRole(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::IgnoreHeader(__self_0),
CopyLegacyOption::IgnoreHeader(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Manifest { verbose: __self_0 },
CopyLegacyOption::Manifest { verbose: __arg1_0 }) =>
__self_0 == __arg1_0,
(CopyLegacyOption::MaxFileSize(__self_0),
CopyLegacyOption::MaxFileSize(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Null(__self_0),
CopyLegacyOption::Null(__arg1_0)) => __self_0 == __arg1_0,
(CopyLegacyOption::Parallel(__self_0),
CopyLegacyOption::Parallel(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::PartitionBy(__self_0),
CopyLegacyOption::PartitionBy(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::Region(__self_0),
CopyLegacyOption::Region(__arg1_0)) => __self_0 == __arg1_0,
(CopyLegacyOption::RowGroupSize(__self_0),
CopyLegacyOption::RowGroupSize(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyOption::TimeFormat(__self_0),
CopyLegacyOption::TimeFormat(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CopyLegacyOption {
#[inline]
fn partial_cmp(&self, other: &CopyLegacyOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match (self, other) {
(CopyLegacyOption::AcceptInvChars(__self_0),
CopyLegacyOption::AcceptInvChars(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Csv(__self_0),
CopyLegacyOption::Csv(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::DateFormat(__self_0),
CopyLegacyOption::DateFormat(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Delimiter(__self_0),
CopyLegacyOption::Delimiter(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Encrypted { auto: __self_0 },
CopyLegacyOption::Encrypted { auto: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Extension(__self_0),
CopyLegacyOption::Extension(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::FixedWidth(__self_0),
CopyLegacyOption::FixedWidth(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::IamRole(__self_0),
CopyLegacyOption::IamRole(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::IgnoreHeader(__self_0),
CopyLegacyOption::IgnoreHeader(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Manifest { verbose: __self_0 },
CopyLegacyOption::Manifest { verbose: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::MaxFileSize(__self_0),
CopyLegacyOption::MaxFileSize(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Null(__self_0),
CopyLegacyOption::Null(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Parallel(__self_0),
CopyLegacyOption::Parallel(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::PartitionBy(__self_0),
CopyLegacyOption::PartitionBy(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::Region(__self_0),
CopyLegacyOption::Region(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::RowGroupSize(__self_0),
CopyLegacyOption::RowGroupSize(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyOption::TimeFormat(__self_0),
CopyLegacyOption::TimeFormat(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::option::Option::Some(::core::cmp::Ordering::Equal),
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CopyLegacyOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<Vec<CopyLegacyCsvOption>>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
let _: ::core::cmp::AssertParamIsEq<char>;
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<String>;
let _: ::core::cmp::AssertParamIsEq<IamRoleKind>;
let _: ::core::cmp::AssertParamIsEq<u64>;
let _: ::core::cmp::AssertParamIsEq<FileSize>;
let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
let _: ::core::cmp::AssertParamIsEq<UnloadPartitionBy>;
let _: ::core::cmp::AssertParamIsEq<Option<String>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CopyLegacyOption {
#[inline]
fn cmp(&self, other: &CopyLegacyOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CopyLegacyOption::AcceptInvChars(__self_0),
CopyLegacyOption::AcceptInvChars(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Csv(__self_0),
CopyLegacyOption::Csv(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::DateFormat(__self_0),
CopyLegacyOption::DateFormat(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Delimiter(__self_0),
CopyLegacyOption::Delimiter(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Encrypted { auto: __self_0 },
CopyLegacyOption::Encrypted { auto: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Extension(__self_0),
CopyLegacyOption::Extension(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::FixedWidth(__self_0),
CopyLegacyOption::FixedWidth(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::IamRole(__self_0),
CopyLegacyOption::IamRole(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::IgnoreHeader(__self_0),
CopyLegacyOption::IgnoreHeader(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Manifest { verbose: __self_0 },
CopyLegacyOption::Manifest { verbose: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::MaxFileSize(__self_0),
CopyLegacyOption::MaxFileSize(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Null(__self_0),
CopyLegacyOption::Null(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Parallel(__self_0),
CopyLegacyOption::Parallel(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::PartitionBy(__self_0),
CopyLegacyOption::PartitionBy(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::Region(__self_0),
CopyLegacyOption::Region(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::RowGroupSize(__self_0),
CopyLegacyOption::RowGroupSize(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyOption::TimeFormat(__self_0),
CopyLegacyOption::TimeFormat(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CopyLegacyOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CopyLegacyOption::AcceptInvChars(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Csv(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::DateFormat(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Delimiter(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Encrypted { auto: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Extension(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::FixedWidth(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::IamRole(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::IgnoreHeader(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Manifest { verbose: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::MaxFileSize(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Null(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Parallel(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::PartitionBy(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::Region(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::RowGroupSize(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyOption::TimeFormat(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
8620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8621#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CopyLegacyOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AcceptAnyDate => {}
Self::AcceptInvChars(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AddQuotes => {}
Self::AllowOverwrite => {}
Self::Binary => {}
Self::BlankAsNull => {}
Self::Bzip2 => {}
Self::CleanPath => {}
Self::Csv(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::DateFormat(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Delimiter(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::EmptyAsNull => {}
Self::Encrypted { auto } => {
sqlparser::ast::Visit::visit(auto, visitor)?;
}
Self::Escape => {}
Self::Extension(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::FixedWidth(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Gzip => {}
Self::Header => {}
Self::IamRole(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IgnoreHeader(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Json => {}
Self::Manifest { verbose } => {
sqlparser::ast::Visit::visit(verbose, visitor)?;
}
Self::MaxFileSize(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Null(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Parallel(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Parquet => {}
Self::PartitionBy(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Region(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::RowGroupSize(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::TimeFormat(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::TruncateColumns => {}
Self::Zstd => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CopyLegacyOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AcceptAnyDate => {}
Self::AcceptInvChars(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AddQuotes => {}
Self::AllowOverwrite => {}
Self::Binary => {}
Self::BlankAsNull => {}
Self::Bzip2 => {}
Self::CleanPath => {}
Self::Csv(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::DateFormat(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Delimiter(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::EmptyAsNull => {}
Self::Encrypted { auto } => {
sqlparser::ast::VisitMut::visit(auto, visitor)?;
}
Self::Escape => {}
Self::Extension(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::FixedWidth(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Gzip => {}
Self::Header => {}
Self::IamRole(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IgnoreHeader(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Json => {}
Self::Manifest { verbose } => {
sqlparser::ast::VisitMut::visit(verbose, visitor)?;
}
Self::MaxFileSize(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Null(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Parallel(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Parquet => {}
Self::PartitionBy(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Region(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::RowGroupSize(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::TimeFormat(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::TruncateColumns => {}
Self::Zstd => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8622pub enum CopyLegacyOption {
8623 AcceptAnyDate,
8625 AcceptInvChars(Option<String>),
8627 AddQuotes,
8629 AllowOverwrite,
8631 Binary,
8633 BlankAsNull,
8635 Bzip2,
8637 CleanPath,
8639 Csv(Vec<CopyLegacyCsvOption>),
8641 DateFormat(Option<String>),
8643 Delimiter(char),
8645 EmptyAsNull,
8647 Encrypted { auto: bool },
8649 Escape,
8651 Extension(String),
8653 FixedWidth(String),
8655 Gzip,
8657 Header,
8659 IamRole(IamRoleKind),
8661 IgnoreHeader(u64),
8663 Json,
8665 Manifest { verbose: bool },
8667 MaxFileSize(FileSize),
8669 Null(String),
8671 Parallel(Option<bool>),
8673 Parquet,
8675 PartitionBy(UnloadPartitionBy),
8677 Region(String),
8679 RowGroupSize(FileSize),
8681 TimeFormat(Option<String>),
8683 TruncateColumns,
8685 Zstd,
8687}
8688
8689impl fmt::Display for CopyLegacyOption {
8690 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8691 use CopyLegacyOption::*;
8692 match self {
8693 AcceptAnyDate => f.write_fmt(format_args!("ACCEPTANYDATE"))write!(f, "ACCEPTANYDATE"),
8694 AcceptInvChars(ch) => {
8695 f.write_fmt(format_args!("ACCEPTINVCHARS"))write!(f, "ACCEPTINVCHARS")?;
8696 if let Some(ch) = ch {
8697 f.write_fmt(format_args!(" \'{0}\'", value::escape_single_quote_string(ch)))write!(f, " '{}'", value::escape_single_quote_string(ch))?;
8698 }
8699 Ok(())
8700 }
8701 AddQuotes => f.write_fmt(format_args!("ADDQUOTES"))write!(f, "ADDQUOTES"),
8702 AllowOverwrite => f.write_fmt(format_args!("ALLOWOVERWRITE"))write!(f, "ALLOWOVERWRITE"),
8703 Binary => f.write_fmt(format_args!("BINARY"))write!(f, "BINARY"),
8704 BlankAsNull => f.write_fmt(format_args!("BLANKSASNULL"))write!(f, "BLANKSASNULL"),
8705 Bzip2 => f.write_fmt(format_args!("BZIP2"))write!(f, "BZIP2"),
8706 CleanPath => f.write_fmt(format_args!("CLEANPATH"))write!(f, "CLEANPATH"),
8707 Csv(opts) => {
8708 f.write_fmt(format_args!("CSV"))write!(f, "CSV")?;
8709 if !opts.is_empty() {
8710 f.write_fmt(format_args!(" {0}", display_separated(opts, " ")))write!(f, " {}", display_separated(opts, " "))?;
8711 }
8712 Ok(())
8713 }
8714 DateFormat(fmt) => {
8715 f.write_fmt(format_args!("DATEFORMAT"))write!(f, "DATEFORMAT")?;
8716 if let Some(fmt) = fmt {
8717 f.write_fmt(format_args!(" \'{0}\'", value::escape_single_quote_string(fmt)))write!(f, " '{}'", value::escape_single_quote_string(fmt))?;
8718 }
8719 Ok(())
8720 }
8721 Delimiter(char) => f.write_fmt(format_args!("DELIMITER \'{0}\'", char))write!(f, "DELIMITER '{char}'"),
8722 EmptyAsNull => f.write_fmt(format_args!("EMPTYASNULL"))write!(f, "EMPTYASNULL"),
8723 Encrypted { auto } => f.write_fmt(format_args!("ENCRYPTED{0}", if *auto { " AUTO" } else { "" }))write!(f, "ENCRYPTED{}", if *auto { " AUTO" } else { "" }),
8724 Escape => f.write_fmt(format_args!("ESCAPE"))write!(f, "ESCAPE"),
8725 Extension(ext) => f.write_fmt(format_args!("EXTENSION \'{0}\'",
value::escape_single_quote_string(ext)))write!(f, "EXTENSION '{}'", value::escape_single_quote_string(ext)),
8726 FixedWidth(spec) => f.write_fmt(format_args!("FIXEDWIDTH \'{0}\'",
value::escape_single_quote_string(spec)))write!(
8727 f,
8728 "FIXEDWIDTH '{}'",
8729 value::escape_single_quote_string(spec)
8730 ),
8731 Gzip => f.write_fmt(format_args!("GZIP"))write!(f, "GZIP"),
8732 Header => f.write_fmt(format_args!("HEADER"))write!(f, "HEADER"),
8733 IamRole(role) => f.write_fmt(format_args!("IAM_ROLE {0}", role))write!(f, "IAM_ROLE {role}"),
8734 IgnoreHeader(num_rows) => f.write_fmt(format_args!("IGNOREHEADER {0}", num_rows))write!(f, "IGNOREHEADER {num_rows}"),
8735 Json => f.write_fmt(format_args!("JSON"))write!(f, "JSON"),
8736 Manifest { verbose } => f.write_fmt(format_args!("MANIFEST{0}",
if *verbose { " VERBOSE" } else { "" }))write!(f, "MANIFEST{}", if *verbose { " VERBOSE" } else { "" }),
8737 MaxFileSize(file_size) => f.write_fmt(format_args!("MAXFILESIZE {0}", file_size))write!(f, "MAXFILESIZE {file_size}"),
8738 Null(string) => f.write_fmt(format_args!("NULL \'{0}\'",
value::escape_single_quote_string(string)))write!(f, "NULL '{}'", value::escape_single_quote_string(string)),
8739 Parallel(enabled) => {
8740 f.write_fmt(format_args!("PARALLEL{0}",
match enabled {
Some(true) => " TRUE",
Some(false) => " FALSE",
_ => "",
}))write!(
8741 f,
8742 "PARALLEL{}",
8743 match enabled {
8744 Some(true) => " TRUE",
8745 Some(false) => " FALSE",
8746 _ => "",
8747 }
8748 )
8749 }
8750 Parquet => f.write_fmt(format_args!("PARQUET"))write!(f, "PARQUET"),
8751 PartitionBy(p) => f.write_fmt(format_args!("{0}", p))write!(f, "{p}"),
8752 Region(region) => f.write_fmt(format_args!("REGION \'{0}\'",
value::escape_single_quote_string(region)))write!(f, "REGION '{}'", value::escape_single_quote_string(region)),
8753 RowGroupSize(file_size) => f.write_fmt(format_args!("ROWGROUPSIZE {0}", file_size))write!(f, "ROWGROUPSIZE {file_size}"),
8754 TimeFormat(fmt) => {
8755 f.write_fmt(format_args!("TIMEFORMAT"))write!(f, "TIMEFORMAT")?;
8756 if let Some(fmt) = fmt {
8757 f.write_fmt(format_args!(" \'{0}\'", value::escape_single_quote_string(fmt)))write!(f, " '{}'", value::escape_single_quote_string(fmt))?;
8758 }
8759 Ok(())
8760 }
8761 TruncateColumns => f.write_fmt(format_args!("TRUNCATECOLUMNS"))write!(f, "TRUNCATECOLUMNS"),
8762 Zstd => f.write_fmt(format_args!("ZSTD"))write!(f, "ZSTD"),
8763 }
8764 }
8765}
8766
8767#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FileSize {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "FileSize",
"size", &self.size, "unit", &&self.unit)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FileSize {
#[inline]
fn clone(&self) -> FileSize {
FileSize {
size: ::core::clone::Clone::clone(&self.size),
unit: ::core::clone::Clone::clone(&self.unit),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FileSize {
#[inline]
fn eq(&self, other: &FileSize) -> bool {
self.size == other.size && self.unit == other.unit
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FileSize {
#[inline]
fn partial_cmp(&self, other: &FileSize)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.size, &other.size) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.unit, &other.unit),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FileSize {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Value>;
let _: ::core::cmp::AssertParamIsEq<Option<FileSizeUnit>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FileSize {
#[inline]
fn cmp(&self, other: &FileSize) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.size, &other.size) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.unit, &other.unit),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FileSize {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.size, state);
::core::hash::Hash::hash(&self.unit, state)
}
}Hash)]
8771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8772#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FileSize {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.size, visitor)?;
sqlparser::ast::Visit::visit(&self.unit, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FileSize {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.size, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.unit, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8773pub struct FileSize {
8774 pub size: Value,
8775 pub unit: Option<FileSizeUnit>,
8776}
8777
8778impl fmt::Display for FileSize {
8779 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8780 f.write_fmt(format_args!("{0}", self.size))write!(f, "{}", self.size)?;
8781 if let Some(unit) = &self.unit {
8782 f.write_fmt(format_args!(" {0}", unit))write!(f, " {unit}")?;
8783 }
8784 Ok(())
8785 }
8786}
8787
8788#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FileSizeUnit {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FileSizeUnit::MB => "MB",
FileSizeUnit::GB => "GB",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FileSizeUnit {
#[inline]
fn clone(&self) -> FileSizeUnit {
match self {
FileSizeUnit::MB => FileSizeUnit::MB,
FileSizeUnit::GB => FileSizeUnit::GB,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FileSizeUnit {
#[inline]
fn eq(&self, other: &FileSizeUnit) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FileSizeUnit {
#[inline]
fn partial_cmp(&self, other: &FileSizeUnit)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FileSizeUnit {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FileSizeUnit {
#[inline]
fn cmp(&self, other: &FileSizeUnit) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FileSizeUnit {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8790#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FileSizeUnit {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::MB => {} Self::GB => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FileSizeUnit {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::MB => {} Self::GB => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8791pub enum FileSizeUnit {
8792 MB,
8793 GB,
8794}
8795
8796impl fmt::Display for FileSizeUnit {
8797 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8798 match self {
8799 FileSizeUnit::MB => f.write_fmt(format_args!("MB"))write!(f, "MB"),
8800 FileSizeUnit::GB => f.write_fmt(format_args!("GB"))write!(f, "GB"),
8801 }
8802 }
8803}
8804
8805#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UnloadPartitionBy {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"UnloadPartitionBy", "columns", &self.columns, "include",
&&self.include)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UnloadPartitionBy {
#[inline]
fn clone(&self) -> UnloadPartitionBy {
UnloadPartitionBy {
columns: ::core::clone::Clone::clone(&self.columns),
include: ::core::clone::Clone::clone(&self.include),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UnloadPartitionBy {
#[inline]
fn eq(&self, other: &UnloadPartitionBy) -> bool {
self.include == other.include && self.columns == other.columns
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UnloadPartitionBy {
#[inline]
fn partial_cmp(&self, other: &UnloadPartitionBy)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.columns,
&other.columns) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.include,
&other.include),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UnloadPartitionBy {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UnloadPartitionBy {
#[inline]
fn cmp(&self, other: &UnloadPartitionBy) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.columns, &other.columns) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.include, &other.include),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UnloadPartitionBy {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.columns, state);
::core::hash::Hash::hash(&self.include, state)
}
}Hash)]
8811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8812#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UnloadPartitionBy {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.columns, visitor)?;
sqlparser::ast::Visit::visit(&self.include, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for UnloadPartitionBy {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.columns, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.include, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8813pub struct UnloadPartitionBy {
8814 pub columns: Vec<Ident>,
8815 pub include: bool,
8816}
8817
8818impl fmt::Display for UnloadPartitionBy {
8819 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8820 f.write_fmt(format_args!("PARTITION BY ({0}){1}",
display_comma_separated(&self.columns),
if self.include { " INCLUDE" } else { "" }))write!(
8821 f,
8822 "PARTITION BY ({}){}",
8823 display_comma_separated(&self.columns),
8824 if self.include { " INCLUDE" } else { "" }
8825 )
8826 }
8827}
8828
8829#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IamRoleKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
IamRoleKind::Default =>
::core::fmt::Formatter::write_str(f, "Default"),
IamRoleKind::Arn(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Arn",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IamRoleKind {
#[inline]
fn clone(&self) -> IamRoleKind {
match self {
IamRoleKind::Default => IamRoleKind::Default,
IamRoleKind::Arn(__self_0) =>
IamRoleKind::Arn(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IamRoleKind {
#[inline]
fn eq(&self, other: &IamRoleKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(IamRoleKind::Arn(__self_0), IamRoleKind::Arn(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IamRoleKind {
#[inline]
fn partial_cmp(&self, other: &IamRoleKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(IamRoleKind::Arn(__self_0), IamRoleKind::Arn(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IamRoleKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IamRoleKind {
#[inline]
fn cmp(&self, other: &IamRoleKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(IamRoleKind::Arn(__self_0), IamRoleKind::Arn(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IamRoleKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
IamRoleKind::Arn(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
8833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8834#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IamRoleKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Default => {}
Self::Arn(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for IamRoleKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Default => {}
Self::Arn(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8835pub enum IamRoleKind {
8836 Default,
8838 Arn(String),
8840}
8841
8842impl fmt::Display for IamRoleKind {
8843 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8844 match self {
8845 IamRoleKind::Default => f.write_fmt(format_args!("DEFAULT"))write!(f, "DEFAULT"),
8846 IamRoleKind::Arn(arn) => f.write_fmt(format_args!("\'{0}\'", arn))write!(f, "'{arn}'"),
8847 }
8848 }
8849}
8850
8851#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CopyLegacyCsvOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CopyLegacyCsvOption::Header =>
::core::fmt::Formatter::write_str(f, "Header"),
CopyLegacyCsvOption::Quote(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Quote",
&__self_0),
CopyLegacyCsvOption::Escape(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Escape",
&__self_0),
CopyLegacyCsvOption::ForceQuote(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ForceQuote", &__self_0),
CopyLegacyCsvOption::ForceNotNull(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"ForceNotNull", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CopyLegacyCsvOption {
#[inline]
fn clone(&self) -> CopyLegacyCsvOption {
match self {
CopyLegacyCsvOption::Header => CopyLegacyCsvOption::Header,
CopyLegacyCsvOption::Quote(__self_0) =>
CopyLegacyCsvOption::Quote(::core::clone::Clone::clone(__self_0)),
CopyLegacyCsvOption::Escape(__self_0) =>
CopyLegacyCsvOption::Escape(::core::clone::Clone::clone(__self_0)),
CopyLegacyCsvOption::ForceQuote(__self_0) =>
CopyLegacyCsvOption::ForceQuote(::core::clone::Clone::clone(__self_0)),
CopyLegacyCsvOption::ForceNotNull(__self_0) =>
CopyLegacyCsvOption::ForceNotNull(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CopyLegacyCsvOption {
#[inline]
fn eq(&self, other: &CopyLegacyCsvOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CopyLegacyCsvOption::Quote(__self_0),
CopyLegacyCsvOption::Quote(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyCsvOption::Escape(__self_0),
CopyLegacyCsvOption::Escape(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyCsvOption::ForceQuote(__self_0),
CopyLegacyCsvOption::ForceQuote(__arg1_0)) =>
__self_0 == __arg1_0,
(CopyLegacyCsvOption::ForceNotNull(__self_0),
CopyLegacyCsvOption::ForceNotNull(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CopyLegacyCsvOption {
#[inline]
fn partial_cmp(&self, other: &CopyLegacyCsvOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CopyLegacyCsvOption::Quote(__self_0),
CopyLegacyCsvOption::Quote(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyCsvOption::Escape(__self_0),
CopyLegacyCsvOption::Escape(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyCsvOption::ForceQuote(__self_0),
CopyLegacyCsvOption::ForceQuote(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CopyLegacyCsvOption::ForceNotNull(__self_0),
CopyLegacyCsvOption::ForceNotNull(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CopyLegacyCsvOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<char>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CopyLegacyCsvOption {
#[inline]
fn cmp(&self, other: &CopyLegacyCsvOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CopyLegacyCsvOption::Quote(__self_0),
CopyLegacyCsvOption::Quote(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyCsvOption::Escape(__self_0),
CopyLegacyCsvOption::Escape(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyCsvOption::ForceQuote(__self_0),
CopyLegacyCsvOption::ForceQuote(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CopyLegacyCsvOption::ForceNotNull(__self_0),
CopyLegacyCsvOption::ForceNotNull(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CopyLegacyCsvOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CopyLegacyCsvOption::Quote(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyCsvOption::Escape(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyCsvOption::ForceQuote(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CopyLegacyCsvOption::ForceNotNull(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
8855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8856#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CopyLegacyCsvOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Header => {}
Self::Quote(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Escape(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ForceQuote(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::ForceNotNull(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CopyLegacyCsvOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Header => {}
Self::Quote(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Escape(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ForceQuote(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::ForceNotNull(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8857pub enum CopyLegacyCsvOption {
8858 Header,
8860 Quote(char),
8862 Escape(char),
8864 ForceQuote(Vec<Ident>),
8866 ForceNotNull(Vec<Ident>),
8868}
8869
8870impl fmt::Display for CopyLegacyCsvOption {
8871 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8872 use CopyLegacyCsvOption::*;
8873 match self {
8874 Header => f.write_fmt(format_args!("HEADER"))write!(f, "HEADER"),
8875 Quote(char) => f.write_fmt(format_args!("QUOTE \'{0}\'", char))write!(f, "QUOTE '{char}'"),
8876 Escape(char) => f.write_fmt(format_args!("ESCAPE \'{0}\'", char))write!(f, "ESCAPE '{char}'"),
8877 ForceQuote(columns) => f.write_fmt(format_args!("FORCE QUOTE {0}", display_comma_separated(columns)))write!(f, "FORCE QUOTE {}", display_comma_separated(columns)),
8878 ForceNotNull(columns) => {
8879 f.write_fmt(format_args!("FORCE NOT NULL {0}",
display_comma_separated(columns)))write!(f, "FORCE NOT NULL {}", display_comma_separated(columns))
8880 }
8881 }
8882 }
8883}
8884
8885#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MergeClauseKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
MergeClauseKind::Matched => "Matched",
MergeClauseKind::NotMatched => "NotMatched",
MergeClauseKind::NotMatchedByTarget => "NotMatchedByTarget",
MergeClauseKind::NotMatchedBySource => "NotMatchedBySource",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MergeClauseKind {
#[inline]
fn clone(&self) -> MergeClauseKind {
match self {
MergeClauseKind::Matched => MergeClauseKind::Matched,
MergeClauseKind::NotMatched => MergeClauseKind::NotMatched,
MergeClauseKind::NotMatchedByTarget =>
MergeClauseKind::NotMatchedByTarget,
MergeClauseKind::NotMatchedBySource =>
MergeClauseKind::NotMatchedBySource,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MergeClauseKind {
#[inline]
fn eq(&self, other: &MergeClauseKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MergeClauseKind {
#[inline]
fn partial_cmp(&self, other: &MergeClauseKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MergeClauseKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MergeClauseKind {
#[inline]
fn cmp(&self, other: &MergeClauseKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MergeClauseKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
8894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8895#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MergeClauseKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Matched => {}
Self::NotMatched => {}
Self::NotMatchedByTarget => {}
Self::NotMatchedBySource => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MergeClauseKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Matched => {}
Self::NotMatched => {}
Self::NotMatchedByTarget => {}
Self::NotMatchedBySource => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8896pub enum MergeClauseKind {
8897 Matched,
8899 NotMatched,
8901 NotMatchedByTarget,
8905 NotMatchedBySource,
8909}
8910
8911impl Display for MergeClauseKind {
8912 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8913 match self {
8914 MergeClauseKind::Matched => f.write_fmt(format_args!("MATCHED"))write!(f, "MATCHED"),
8915 MergeClauseKind::NotMatched => f.write_fmt(format_args!("NOT MATCHED"))write!(f, "NOT MATCHED"),
8916 MergeClauseKind::NotMatchedByTarget => f.write_fmt(format_args!("NOT MATCHED BY TARGET"))write!(f, "NOT MATCHED BY TARGET"),
8917 MergeClauseKind::NotMatchedBySource => f.write_fmt(format_args!("NOT MATCHED BY SOURCE"))write!(f, "NOT MATCHED BY SOURCE"),
8918 }
8919 }
8920}
8921
8922#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MergeInsertKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
MergeInsertKind::Values(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Values",
&__self_0),
MergeInsertKind::Row =>
::core::fmt::Formatter::write_str(f, "Row"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MergeInsertKind {
#[inline]
fn clone(&self) -> MergeInsertKind {
match self {
MergeInsertKind::Values(__self_0) =>
MergeInsertKind::Values(::core::clone::Clone::clone(__self_0)),
MergeInsertKind::Row => MergeInsertKind::Row,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MergeInsertKind {
#[inline]
fn eq(&self, other: &MergeInsertKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(MergeInsertKind::Values(__self_0),
MergeInsertKind::Values(__arg1_0)) => __self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MergeInsertKind {
#[inline]
fn partial_cmp(&self, other: &MergeInsertKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(MergeInsertKind::Values(__self_0),
MergeInsertKind::Values(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MergeInsertKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Values>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MergeInsertKind {
#[inline]
fn cmp(&self, other: &MergeInsertKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(MergeInsertKind::Values(__self_0),
MergeInsertKind::Values(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MergeInsertKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
MergeInsertKind::Values(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
8927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8928#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MergeInsertKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Values(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Row => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MergeInsertKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Values(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Row => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8929pub enum MergeInsertKind {
8930 Values(Values),
8937 Row,
8945}
8946
8947impl Display for MergeInsertKind {
8948 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8949 match self {
8950 MergeInsertKind::Values(values) => {
8951 f.write_fmt(format_args!("{0}", values))write!(f, "{values}")
8952 }
8953 MergeInsertKind::Row => {
8954 f.write_fmt(format_args!("ROW"))write!(f, "ROW")
8955 }
8956 }
8957 }
8958}
8959
8960#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MergeInsertExpr {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"MergeInsertExpr", "columns", &self.columns, "kind", &&self.kind)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MergeInsertExpr {
#[inline]
fn clone(&self) -> MergeInsertExpr {
MergeInsertExpr {
columns: ::core::clone::Clone::clone(&self.columns),
kind: ::core::clone::Clone::clone(&self.kind),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MergeInsertExpr {
#[inline]
fn eq(&self, other: &MergeInsertExpr) -> bool {
self.columns == other.columns && self.kind == other.kind
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MergeInsertExpr {
#[inline]
fn partial_cmp(&self, other: &MergeInsertExpr)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.columns,
&other.columns) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.kind, &other.kind),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MergeInsertExpr {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
let _: ::core::cmp::AssertParamIsEq<MergeInsertKind>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MergeInsertExpr {
#[inline]
fn cmp(&self, other: &MergeInsertExpr) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.columns, &other.columns) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.kind, &other.kind),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MergeInsertExpr {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.columns, state);
::core::hash::Hash::hash(&self.kind, state)
}
}Hash)]
8971#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8972#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MergeInsertExpr {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.columns, visitor)?;
sqlparser::ast::Visit::visit(&self.kind, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MergeInsertExpr {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.columns, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.kind, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
8973pub struct MergeInsertExpr {
8974 pub columns: Vec<Ident>,
8982 pub kind: MergeInsertKind,
8984}
8985
8986impl Display for MergeInsertExpr {
8987 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
8988 if !self.columns.is_empty() {
8989 f.write_fmt(format_args!("({0}) ",
display_comma_separated(self.columns.as_slice())))write!(f, "({}) ", display_comma_separated(self.columns.as_slice()))?;
8990 }
8991 f.write_fmt(format_args!("{0}", self.kind))write!(f, "{}", self.kind)
8992 }
8993}
8994
8995#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MergeAction {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
MergeAction::Insert(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Insert",
&__self_0),
MergeAction::Update { assignments: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Update", "assignments", &__self_0),
MergeAction::Delete =>
::core::fmt::Formatter::write_str(f, "Delete"),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MergeAction {
#[inline]
fn clone(&self) -> MergeAction {
match self {
MergeAction::Insert(__self_0) =>
MergeAction::Insert(::core::clone::Clone::clone(__self_0)),
MergeAction::Update { assignments: __self_0 } =>
MergeAction::Update {
assignments: ::core::clone::Clone::clone(__self_0),
},
MergeAction::Delete => MergeAction::Delete,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MergeAction {
#[inline]
fn eq(&self, other: &MergeAction) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(MergeAction::Insert(__self_0), MergeAction::Insert(__arg1_0))
=> __self_0 == __arg1_0,
(MergeAction::Update { assignments: __self_0 },
MergeAction::Update { assignments: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MergeAction {
#[inline]
fn partial_cmp(&self, other: &MergeAction)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(MergeAction::Insert(__self_0), MergeAction::Insert(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(MergeAction::Update { assignments: __self_0 },
MergeAction::Update { assignments: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MergeAction {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<MergeInsertExpr>;
let _: ::core::cmp::AssertParamIsEq<Vec<Assignment>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MergeAction {
#[inline]
fn cmp(&self, other: &MergeAction) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(MergeAction::Insert(__self_0),
MergeAction::Insert(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(MergeAction::Update { assignments: __self_0 },
MergeAction::Update { assignments: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MergeAction {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
MergeAction::Insert(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
MergeAction::Update { assignments: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
9005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9006#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MergeAction {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Insert(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Update { assignments } => {
sqlparser::ast::Visit::visit(assignments, visitor)?;
}
Self::Delete => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MergeAction {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Insert(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Update { assignments } => {
sqlparser::ast::VisitMut::visit(assignments, visitor)?;
}
Self::Delete => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9007pub enum MergeAction {
9008 Insert(MergeInsertExpr),
9015 Update { assignments: Vec<Assignment> },
9022 Delete,
9024}
9025
9026impl Display for MergeAction {
9027 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9028 match self {
9029 MergeAction::Insert(insert) => {
9030 f.write_fmt(format_args!("INSERT {0}", insert))write!(f, "INSERT {insert}")
9031 }
9032 MergeAction::Update { assignments } => {
9033 f.write_fmt(format_args!("UPDATE SET {0}",
display_comma_separated(assignments)))write!(f, "UPDATE SET {}", display_comma_separated(assignments))
9034 }
9035 MergeAction::Delete => {
9036 f.write_fmt(format_args!("DELETE"))write!(f, "DELETE")
9037 }
9038 }
9039 }
9040}
9041
9042#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MergeClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "MergeClause",
"clause_kind", &self.clause_kind, "predicate", &self.predicate,
"action", &&self.action)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MergeClause {
#[inline]
fn clone(&self) -> MergeClause {
MergeClause {
clause_kind: ::core::clone::Clone::clone(&self.clause_kind),
predicate: ::core::clone::Clone::clone(&self.predicate),
action: ::core::clone::Clone::clone(&self.action),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MergeClause {
#[inline]
fn eq(&self, other: &MergeClause) -> bool {
self.clause_kind == other.clause_kind &&
self.predicate == other.predicate &&
self.action == other.action
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MergeClause {
#[inline]
fn partial_cmp(&self, other: &MergeClause)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.clause_kind,
&other.clause_kind) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.predicate,
&other.predicate) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.action,
&other.action),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MergeClause {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<MergeClauseKind>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<MergeAction>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MergeClause {
#[inline]
fn cmp(&self, other: &MergeClause) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.clause_kind, &other.clause_kind) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.predicate, &other.predicate)
{
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.action, &other.action),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MergeClause {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.clause_kind, state);
::core::hash::Hash::hash(&self.predicate, state);
::core::hash::Hash::hash(&self.action, state)
}
}Hash)]
9051#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9052#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MergeClause {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.clause_kind, visitor)?;
sqlparser::ast::Visit::visit(&self.predicate, visitor)?;
sqlparser::ast::Visit::visit(&self.action, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MergeClause {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.clause_kind, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.predicate, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.action, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9053pub struct MergeClause {
9054 pub clause_kind: MergeClauseKind,
9055 pub predicate: Option<Expr>,
9056 pub action: MergeAction,
9057}
9058
9059impl Display for MergeClause {
9060 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9061 let MergeClause {
9062 clause_kind,
9063 predicate,
9064 action,
9065 } = self;
9066
9067 f.write_fmt(format_args!("WHEN {0}", clause_kind))write!(f, "WHEN {clause_kind}")?;
9068 if let Some(pred) = predicate {
9069 f.write_fmt(format_args!(" AND {0}", pred))write!(f, " AND {pred}")?;
9070 }
9071 f.write_fmt(format_args!(" THEN {0}", action))write!(f, " THEN {action}")
9072 }
9073}
9074
9075#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OutputClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
OutputClause::Output {
select_items: __self_0, into_table: __self_1 } =>
::core::fmt::Formatter::debug_struct_field2_finish(f,
"Output", "select_items", __self_0, "into_table",
&__self_1),
OutputClause::Returning { select_items: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f,
"Returning", "select_items", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OutputClause {
#[inline]
fn clone(&self) -> OutputClause {
match self {
OutputClause::Output {
select_items: __self_0, into_table: __self_1 } =>
OutputClause::Output {
select_items: ::core::clone::Clone::clone(__self_0),
into_table: ::core::clone::Clone::clone(__self_1),
},
OutputClause::Returning { select_items: __self_0 } =>
OutputClause::Returning {
select_items: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OutputClause {
#[inline]
fn eq(&self, other: &OutputClause) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(OutputClause::Output {
select_items: __self_0, into_table: __self_1 },
OutputClause::Output {
select_items: __arg1_0, into_table: __arg1_1 }) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
(OutputClause::Returning { select_items: __self_0 },
OutputClause::Returning { select_items: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OutputClause {
#[inline]
fn partial_cmp(&self, other: &OutputClause)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(OutputClause::Output {
select_items: __self_0, into_table: __self_1 },
OutputClause::Output {
select_items: __arg1_0, into_table: __arg1_1 }) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
(OutputClause::Returning { select_items: __self_0 },
OutputClause::Returning { select_items: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OutputClause {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<SelectItem>>;
let _: ::core::cmp::AssertParamIsEq<Option<SelectInto>>;
let _: ::core::cmp::AssertParamIsEq<Vec<SelectItem>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OutputClause {
#[inline]
fn cmp(&self, other: &OutputClause) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(OutputClause::Output {
select_items: __self_0, into_table: __self_1 },
OutputClause::Output {
select_items: __arg1_0, into_table: __arg1_1 }) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
(OutputClause::Returning { select_items: __self_0 },
OutputClause::Returning { select_items: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OutputClause {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
OutputClause::Output {
select_items: __self_0, into_table: __self_1 } => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
OutputClause::Returning { select_items: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9082#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OutputClause {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Output { select_items, into_table } => {
sqlparser::ast::Visit::visit(select_items, visitor)?;
sqlparser::ast::Visit::visit(into_table, visitor)?;
}
Self::Returning { select_items } => {
sqlparser::ast::Visit::visit(select_items, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OutputClause {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Output { select_items, into_table } => {
sqlparser::ast::VisitMut::visit(select_items, visitor)?;
sqlparser::ast::VisitMut::visit(into_table, visitor)?;
}
Self::Returning { select_items } => {
sqlparser::ast::VisitMut::visit(select_items, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9083pub enum OutputClause {
9084 Output {
9085 select_items: Vec<SelectItem>,
9086 into_table: Option<SelectInto>,
9087 },
9088 Returning {
9089 select_items: Vec<SelectItem>,
9090 },
9091}
9092
9093impl fmt::Display for OutputClause {
9094 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9095 match self {
9096 OutputClause::Output {
9097 select_items,
9098 into_table,
9099 } => {
9100 f.write_str("OUTPUT ")?;
9101 display_comma_separated(select_items).fmt(f)?;
9102 if let Some(into_table) = into_table {
9103 f.write_str(" ")?;
9104 into_table.fmt(f)?;
9105 }
9106 Ok(())
9107 }
9108 OutputClause::Returning { select_items } => {
9109 f.write_str("RETURNING ")?;
9110 display_comma_separated(select_items).fmt(f)
9111 }
9112 }
9113 }
9114}
9115
9116#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DiscardObject {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
DiscardObject::ALL => "ALL",
DiscardObject::PLANS => "PLANS",
DiscardObject::SEQUENCES => "SEQUENCES",
DiscardObject::TEMP => "TEMP",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for DiscardObject { }Copy, #[automatically_derived]
impl ::core::clone::Clone for DiscardObject {
#[inline]
fn clone(&self) -> DiscardObject { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DiscardObject {
#[inline]
fn eq(&self, other: &DiscardObject) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DiscardObject {
#[inline]
fn partial_cmp(&self, other: &DiscardObject)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DiscardObject {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DiscardObject {
#[inline]
fn cmp(&self, other: &DiscardObject) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DiscardObject {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9118#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DiscardObject {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ALL => {}
Self::PLANS => {}
Self::SEQUENCES => {}
Self::TEMP => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for DiscardObject {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::ALL => {}
Self::PLANS => {}
Self::SEQUENCES => {}
Self::TEMP => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9119pub enum DiscardObject {
9120 ALL,
9121 PLANS,
9122 SEQUENCES,
9123 TEMP,
9124}
9125
9126impl fmt::Display for DiscardObject {
9127 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9128 match self {
9129 DiscardObject::ALL => f.write_str("ALL"),
9130 DiscardObject::PLANS => f.write_str("PLANS"),
9131 DiscardObject::SEQUENCES => f.write_str("SEQUENCES"),
9132 DiscardObject::TEMP => f.write_str("TEMP"),
9133 }
9134 }
9135}
9136
9137#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FlushType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FlushType::BinaryLogs => "BinaryLogs",
FlushType::EngineLogs => "EngineLogs",
FlushType::ErrorLogs => "ErrorLogs",
FlushType::GeneralLogs => "GeneralLogs",
FlushType::Hosts => "Hosts",
FlushType::Logs => "Logs",
FlushType::Privileges => "Privileges",
FlushType::OptimizerCosts => "OptimizerCosts",
FlushType::RelayLogs => "RelayLogs",
FlushType::SlowLogs => "SlowLogs",
FlushType::Status => "Status",
FlushType::UserResources => "UserResources",
FlushType::Tables => "Tables",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for FlushType { }Copy, #[automatically_derived]
impl ::core::clone::Clone for FlushType {
#[inline]
fn clone(&self) -> FlushType { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FlushType {
#[inline]
fn eq(&self, other: &FlushType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FlushType {
#[inline]
fn partial_cmp(&self, other: &FlushType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FlushType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FlushType {
#[inline]
fn cmp(&self, other: &FlushType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FlushType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9139#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FlushType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::BinaryLogs => {}
Self::EngineLogs => {}
Self::ErrorLogs => {}
Self::GeneralLogs => {}
Self::Hosts => {}
Self::Logs => {}
Self::Privileges => {}
Self::OptimizerCosts => {}
Self::RelayLogs => {}
Self::SlowLogs => {}
Self::Status => {}
Self::UserResources => {}
Self::Tables => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FlushType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::BinaryLogs => {}
Self::EngineLogs => {}
Self::ErrorLogs => {}
Self::GeneralLogs => {}
Self::Hosts => {}
Self::Logs => {}
Self::Privileges => {}
Self::OptimizerCosts => {}
Self::RelayLogs => {}
Self::SlowLogs => {}
Self::Status => {}
Self::UserResources => {}
Self::Tables => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9140pub enum FlushType {
9141 BinaryLogs,
9142 EngineLogs,
9143 ErrorLogs,
9144 GeneralLogs,
9145 Hosts,
9146 Logs,
9147 Privileges,
9148 OptimizerCosts,
9149 RelayLogs,
9150 SlowLogs,
9151 Status,
9152 UserResources,
9153 Tables,
9154}
9155
9156impl fmt::Display for FlushType {
9157 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9158 match self {
9159 FlushType::BinaryLogs => f.write_str("BINARY LOGS"),
9160 FlushType::EngineLogs => f.write_str("ENGINE LOGS"),
9161 FlushType::ErrorLogs => f.write_str("ERROR LOGS"),
9162 FlushType::GeneralLogs => f.write_str("GENERAL LOGS"),
9163 FlushType::Hosts => f.write_str("HOSTS"),
9164 FlushType::Logs => f.write_str("LOGS"),
9165 FlushType::Privileges => f.write_str("PRIVILEGES"),
9166 FlushType::OptimizerCosts => f.write_str("OPTIMIZER_COSTS"),
9167 FlushType::RelayLogs => f.write_str("RELAY LOGS"),
9168 FlushType::SlowLogs => f.write_str("SLOW LOGS"),
9169 FlushType::Status => f.write_str("STATUS"),
9170 FlushType::UserResources => f.write_str("USER_RESOURCES"),
9171 FlushType::Tables => f.write_str("TABLES"),
9172 }
9173 }
9174}
9175
9176#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FlushLocation {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FlushLocation::NoWriteToBinlog => "NoWriteToBinlog",
FlushLocation::Local => "Local",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for FlushLocation { }Copy, #[automatically_derived]
impl ::core::clone::Clone for FlushLocation {
#[inline]
fn clone(&self) -> FlushLocation { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FlushLocation {
#[inline]
fn eq(&self, other: &FlushLocation) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FlushLocation {
#[inline]
fn partial_cmp(&self, other: &FlushLocation)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FlushLocation {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FlushLocation {
#[inline]
fn cmp(&self, other: &FlushLocation) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FlushLocation {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9177#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9178#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FlushLocation {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::NoWriteToBinlog => {} Self::Local => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FlushLocation {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::NoWriteToBinlog => {} Self::Local => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9179pub enum FlushLocation {
9180 NoWriteToBinlog,
9181 Local,
9182}
9183
9184impl fmt::Display for FlushLocation {
9185 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9186 match self {
9187 FlushLocation::NoWriteToBinlog => f.write_str("NO_WRITE_TO_BINLOG"),
9188 FlushLocation::Local => f.write_str("LOCAL"),
9189 }
9190 }
9191}
9192
9193#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ContextModifier {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ContextModifier::Local => "Local",
ContextModifier::Session => "Session",
ContextModifier::Global => "Global",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for ContextModifier { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ContextModifier {
#[inline]
fn clone(&self) -> ContextModifier { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ContextModifier {
#[inline]
fn eq(&self, other: &ContextModifier) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ContextModifier {
#[inline]
fn partial_cmp(&self, other: &ContextModifier)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ContextModifier {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ContextModifier {
#[inline]
fn cmp(&self, other: &ContextModifier) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ContextModifier {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9196#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ContextModifier {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Local => {}
Self::Session => {}
Self::Global => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ContextModifier {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Local => {}
Self::Session => {}
Self::Global => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9197pub enum ContextModifier {
9198 Local,
9200 Session,
9202 Global,
9204}
9205
9206impl fmt::Display for ContextModifier {
9207 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9208 match self {
9209 Self::Local => {
9210 f.write_fmt(format_args!("LOCAL "))write!(f, "LOCAL ")
9211 }
9212 Self::Session => {
9213 f.write_fmt(format_args!("SESSION "))write!(f, "SESSION ")
9214 }
9215 Self::Global => {
9216 f.write_fmt(format_args!("GLOBAL "))write!(f, "GLOBAL ")
9217 }
9218 }
9219 }
9220}
9221
9222#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropFunctionOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
DropFunctionOption::Restrict => "Restrict",
DropFunctionOption::Cascade => "Cascade",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropFunctionOption {
#[inline]
fn clone(&self) -> DropFunctionOption {
match self {
DropFunctionOption::Restrict => DropFunctionOption::Restrict,
DropFunctionOption::Cascade => DropFunctionOption::Cascade,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropFunctionOption {
#[inline]
fn eq(&self, other: &DropFunctionOption) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropFunctionOption {
#[inline]
fn partial_cmp(&self, other: &DropFunctionOption)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropFunctionOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropFunctionOption {
#[inline]
fn cmp(&self, other: &DropFunctionOption) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropFunctionOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9224#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9225pub enum DropFunctionOption {
9226 Restrict,
9227 Cascade,
9228}
9229
9230impl fmt::Display for DropFunctionOption {
9231 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9232 match self {
9233 DropFunctionOption::Restrict => f.write_fmt(format_args!("RESTRICT "))write!(f, "RESTRICT "),
9234 DropFunctionOption::Cascade => f.write_fmt(format_args!("CASCADE "))write!(f, "CASCADE "),
9235 }
9236 }
9237}
9238
9239#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionDesc {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "FunctionDesc",
"name", &self.name, "args", &&self.args)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionDesc {
#[inline]
fn clone(&self) -> FunctionDesc {
FunctionDesc {
name: ::core::clone::Clone::clone(&self.name),
args: ::core::clone::Clone::clone(&self.args),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionDesc {
#[inline]
fn eq(&self, other: &FunctionDesc) -> bool {
self.name == other.name && self.args == other.args
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionDesc {
#[inline]
fn partial_cmp(&self, other: &FunctionDesc)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.args, &other.args),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionDesc {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Option<Vec<OperateFunctionArg>>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionDesc {
#[inline]
fn cmp(&self, other: &FunctionDesc) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.args, &other.args),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionDesc {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.args, state)
}
}Hash)]
9241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9242#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionDesc {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.args, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionDesc {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.args, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9243pub struct FunctionDesc {
9244 pub name: ObjectName,
9245 pub args: Option<Vec<OperateFunctionArg>>,
9246}
9247
9248impl fmt::Display for FunctionDesc {
9249 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9250 f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)?;
9251 if let Some(args) = &self.args {
9252 f.write_fmt(format_args!("({0})", display_comma_separated(args)))write!(f, "({})", display_comma_separated(args))?;
9253 }
9254 Ok(())
9255 }
9256}
9257
9258#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperateFunctionArg {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field4_finish(f,
"OperateFunctionArg", "mode", &self.mode, "name", &self.name,
"data_type", &self.data_type, "default_expr", &&self.default_expr)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperateFunctionArg {
#[inline]
fn clone(&self) -> OperateFunctionArg {
OperateFunctionArg {
mode: ::core::clone::Clone::clone(&self.mode),
name: ::core::clone::Clone::clone(&self.name),
data_type: ::core::clone::Clone::clone(&self.data_type),
default_expr: ::core::clone::Clone::clone(&self.default_expr),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperateFunctionArg {
#[inline]
fn eq(&self, other: &OperateFunctionArg) -> bool {
self.mode == other.mode && self.name == other.name &&
self.data_type == other.data_type &&
self.default_expr == other.default_expr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperateFunctionArg {
#[inline]
fn partial_cmp(&self, other: &OperateFunctionArg)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.mode, &other.mode) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.name,
&other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
&other.data_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.default_expr,
&other.default_expr),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperateFunctionArg {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<ArgMode>>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<DataType>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperateFunctionArg {
#[inline]
fn cmp(&self, other: &OperateFunctionArg) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.mode, &other.mode) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.data_type,
&other.data_type) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.default_expr,
&other.default_expr),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperateFunctionArg {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.mode, state);
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.data_type, state);
::core::hash::Hash::hash(&self.default_expr, state)
}
}Hash)]
9260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9261#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperateFunctionArg {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.mode, visitor)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
sqlparser::ast::Visit::visit(&self.default_expr, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OperateFunctionArg {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.mode, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.data_type, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.default_expr, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9262pub struct OperateFunctionArg {
9263 pub mode: Option<ArgMode>,
9264 pub name: Option<Ident>,
9265 pub data_type: DataType,
9266 pub default_expr: Option<Expr>,
9267}
9268
9269impl OperateFunctionArg {
9270 pub fn unnamed(data_type: DataType) -> Self {
9272 Self {
9273 mode: None,
9274 name: None,
9275 data_type,
9276 default_expr: None,
9277 }
9278 }
9279
9280 pub fn with_name(name: &str, data_type: DataType) -> Self {
9282 Self {
9283 mode: None,
9284 name: Some(name.into()),
9285 data_type,
9286 default_expr: None,
9287 }
9288 }
9289}
9290
9291impl fmt::Display for OperateFunctionArg {
9292 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9293 if let Some(mode) = &self.mode {
9294 f.write_fmt(format_args!("{0} ", mode))write!(f, "{mode} ")?;
9295 }
9296 if let Some(name) = &self.name {
9297 f.write_fmt(format_args!("{0} ", name))write!(f, "{name} ")?;
9298 }
9299 f.write_fmt(format_args!("{0}", self.data_type))write!(f, "{}", self.data_type)?;
9300 if let Some(default_expr) = &self.default_expr {
9301 f.write_fmt(format_args!(" = {0}", default_expr))write!(f, " = {default_expr}")?;
9302 }
9303 Ok(())
9304 }
9305}
9306
9307#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ArgMode {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ArgMode::In => "In",
ArgMode::Out => "Out",
ArgMode::InOut => "InOut",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ArgMode {
#[inline]
fn clone(&self) -> ArgMode {
match self {
ArgMode::In => ArgMode::In,
ArgMode::Out => ArgMode::Out,
ArgMode::InOut => ArgMode::InOut,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ArgMode {
#[inline]
fn eq(&self, other: &ArgMode) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ArgMode {
#[inline]
fn partial_cmp(&self, other: &ArgMode)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ArgMode {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ArgMode {
#[inline]
fn cmp(&self, other: &ArgMode) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ArgMode {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9309#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9310#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ArgMode {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::In => {} Self::Out => {} Self::InOut => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ArgMode {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::In => {} Self::Out => {} Self::InOut => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9311pub enum ArgMode {
9312 In,
9313 Out,
9314 InOut,
9315}
9316
9317impl fmt::Display for ArgMode {
9318 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9319 match self {
9320 ArgMode::In => f.write_fmt(format_args!("IN"))write!(f, "IN"),
9321 ArgMode::Out => f.write_fmt(format_args!("OUT"))write!(f, "OUT"),
9322 ArgMode::InOut => f.write_fmt(format_args!("INOUT"))write!(f, "INOUT"),
9323 }
9324 }
9325}
9326
9327#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionBehavior {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FunctionBehavior::Immutable => "Immutable",
FunctionBehavior::Stable => "Stable",
FunctionBehavior::Volatile => "Volatile",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionBehavior {
#[inline]
fn clone(&self) -> FunctionBehavior {
match self {
FunctionBehavior::Immutable => FunctionBehavior::Immutable,
FunctionBehavior::Stable => FunctionBehavior::Stable,
FunctionBehavior::Volatile => FunctionBehavior::Volatile,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionBehavior {
#[inline]
fn eq(&self, other: &FunctionBehavior) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionBehavior {
#[inline]
fn partial_cmp(&self, other: &FunctionBehavior)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionBehavior {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionBehavior {
#[inline]
fn cmp(&self, other: &FunctionBehavior) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionBehavior {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9330#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionBehavior {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Immutable => {}
Self::Stable => {}
Self::Volatile => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionBehavior {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Immutable => {}
Self::Stable => {}
Self::Volatile => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9331pub enum FunctionBehavior {
9332 Immutable,
9333 Stable,
9334 Volatile,
9335}
9336
9337impl fmt::Display for FunctionBehavior {
9338 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9339 match self {
9340 FunctionBehavior::Immutable => f.write_fmt(format_args!("IMMUTABLE"))write!(f, "IMMUTABLE"),
9341 FunctionBehavior::Stable => f.write_fmt(format_args!("STABLE"))write!(f, "STABLE"),
9342 FunctionBehavior::Volatile => f.write_fmt(format_args!("VOLATILE"))write!(f, "VOLATILE"),
9343 }
9344 }
9345}
9346
9347#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionCalledOnNull {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FunctionCalledOnNull::CalledOnNullInput =>
"CalledOnNullInput",
FunctionCalledOnNull::ReturnsNullOnNullInput =>
"ReturnsNullOnNullInput",
FunctionCalledOnNull::Strict => "Strict",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionCalledOnNull {
#[inline]
fn clone(&self) -> FunctionCalledOnNull {
match self {
FunctionCalledOnNull::CalledOnNullInput =>
FunctionCalledOnNull::CalledOnNullInput,
FunctionCalledOnNull::ReturnsNullOnNullInput =>
FunctionCalledOnNull::ReturnsNullOnNullInput,
FunctionCalledOnNull::Strict => FunctionCalledOnNull::Strict,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionCalledOnNull {
#[inline]
fn eq(&self, other: &FunctionCalledOnNull) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionCalledOnNull {
#[inline]
fn partial_cmp(&self, other: &FunctionCalledOnNull)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionCalledOnNull {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionCalledOnNull {
#[inline]
fn cmp(&self, other: &FunctionCalledOnNull) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionCalledOnNull {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9350#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionCalledOnNull {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::CalledOnNullInput => {}
Self::ReturnsNullOnNullInput => {}
Self::Strict => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionCalledOnNull {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::CalledOnNullInput => {}
Self::ReturnsNullOnNullInput => {}
Self::Strict => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9351pub enum FunctionCalledOnNull {
9352 CalledOnNullInput,
9353 ReturnsNullOnNullInput,
9354 Strict,
9355}
9356
9357impl fmt::Display for FunctionCalledOnNull {
9358 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9359 match self {
9360 FunctionCalledOnNull::CalledOnNullInput => f.write_fmt(format_args!("CALLED ON NULL INPUT"))write!(f, "CALLED ON NULL INPUT"),
9361 FunctionCalledOnNull::ReturnsNullOnNullInput => f.write_fmt(format_args!("RETURNS NULL ON NULL INPUT"))write!(f, "RETURNS NULL ON NULL INPUT"),
9362 FunctionCalledOnNull::Strict => f.write_fmt(format_args!("STRICT"))write!(f, "STRICT"),
9363 }
9364 }
9365}
9366
9367#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionParallel {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FunctionParallel::Unsafe => "Unsafe",
FunctionParallel::Restricted => "Restricted",
FunctionParallel::Safe => "Safe",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionParallel {
#[inline]
fn clone(&self) -> FunctionParallel {
match self {
FunctionParallel::Unsafe => FunctionParallel::Unsafe,
FunctionParallel::Restricted => FunctionParallel::Restricted,
FunctionParallel::Safe => FunctionParallel::Safe,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionParallel {
#[inline]
fn eq(&self, other: &FunctionParallel) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionParallel {
#[inline]
fn partial_cmp(&self, other: &FunctionParallel)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionParallel {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionParallel {
#[inline]
fn cmp(&self, other: &FunctionParallel) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionParallel {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9370#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionParallel {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Unsafe => {}
Self::Restricted => {}
Self::Safe => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionParallel {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Unsafe => {}
Self::Restricted => {}
Self::Safe => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9371pub enum FunctionParallel {
9372 Unsafe,
9373 Restricted,
9374 Safe,
9375}
9376
9377impl fmt::Display for FunctionParallel {
9378 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9379 match self {
9380 FunctionParallel::Unsafe => f.write_fmt(format_args!("PARALLEL UNSAFE"))write!(f, "PARALLEL UNSAFE"),
9381 FunctionParallel::Restricted => f.write_fmt(format_args!("PARALLEL RESTRICTED"))write!(f, "PARALLEL RESTRICTED"),
9382 FunctionParallel::Safe => f.write_fmt(format_args!("PARALLEL SAFE"))write!(f, "PARALLEL SAFE"),
9383 }
9384 }
9385}
9386
9387#[derive(#[automatically_derived]
impl ::core::fmt::Debug for FunctionDeterminismSpecifier {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
FunctionDeterminismSpecifier::Deterministic =>
"Deterministic",
FunctionDeterminismSpecifier::NotDeterministic =>
"NotDeterministic",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for FunctionDeterminismSpecifier {
#[inline]
fn clone(&self) -> FunctionDeterminismSpecifier {
match self {
FunctionDeterminismSpecifier::Deterministic =>
FunctionDeterminismSpecifier::Deterministic,
FunctionDeterminismSpecifier::NotDeterministic =>
FunctionDeterminismSpecifier::NotDeterministic,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for FunctionDeterminismSpecifier {
#[inline]
fn eq(&self, other: &FunctionDeterminismSpecifier) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for FunctionDeterminismSpecifier {
#[inline]
fn partial_cmp(&self, other: &FunctionDeterminismSpecifier)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for FunctionDeterminismSpecifier {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for FunctionDeterminismSpecifier {
#[inline]
fn cmp(&self, other: &FunctionDeterminismSpecifier)
-> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for FunctionDeterminismSpecifier {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9392#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for FunctionDeterminismSpecifier {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Deterministic => {} Self::NotDeterministic => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for FunctionDeterminismSpecifier {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Deterministic => {} Self::NotDeterministic => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9393pub enum FunctionDeterminismSpecifier {
9394 Deterministic,
9395 NotDeterministic,
9396}
9397
9398impl fmt::Display for FunctionDeterminismSpecifier {
9399 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9400 match self {
9401 FunctionDeterminismSpecifier::Deterministic => {
9402 f.write_fmt(format_args!("DETERMINISTIC"))write!(f, "DETERMINISTIC")
9403 }
9404 FunctionDeterminismSpecifier::NotDeterministic => {
9405 f.write_fmt(format_args!("NOT DETERMINISTIC"))write!(f, "NOT DETERMINISTIC")
9406 }
9407 }
9408 }
9409}
9410
9411#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateFunctionBody {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CreateFunctionBody::AsBeforeOptions(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AsBeforeOptions", &__self_0),
CreateFunctionBody::AsAfterOptions(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AsAfterOptions", &__self_0),
CreateFunctionBody::AsBeginEnd(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AsBeginEnd", &__self_0),
CreateFunctionBody::Return(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Return",
&__self_0),
CreateFunctionBody::AsReturnExpr(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AsReturnExpr", &__self_0),
CreateFunctionBody::AsReturnSelect(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"AsReturnSelect", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateFunctionBody {
#[inline]
fn clone(&self) -> CreateFunctionBody {
match self {
CreateFunctionBody::AsBeforeOptions(__self_0) =>
CreateFunctionBody::AsBeforeOptions(::core::clone::Clone::clone(__self_0)),
CreateFunctionBody::AsAfterOptions(__self_0) =>
CreateFunctionBody::AsAfterOptions(::core::clone::Clone::clone(__self_0)),
CreateFunctionBody::AsBeginEnd(__self_0) =>
CreateFunctionBody::AsBeginEnd(::core::clone::Clone::clone(__self_0)),
CreateFunctionBody::Return(__self_0) =>
CreateFunctionBody::Return(::core::clone::Clone::clone(__self_0)),
CreateFunctionBody::AsReturnExpr(__self_0) =>
CreateFunctionBody::AsReturnExpr(::core::clone::Clone::clone(__self_0)),
CreateFunctionBody::AsReturnSelect(__self_0) =>
CreateFunctionBody::AsReturnSelect(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateFunctionBody {
#[inline]
fn eq(&self, other: &CreateFunctionBody) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CreateFunctionBody::AsBeforeOptions(__self_0),
CreateFunctionBody::AsBeforeOptions(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateFunctionBody::AsAfterOptions(__self_0),
CreateFunctionBody::AsAfterOptions(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateFunctionBody::AsBeginEnd(__self_0),
CreateFunctionBody::AsBeginEnd(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateFunctionBody::Return(__self_0),
CreateFunctionBody::Return(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateFunctionBody::AsReturnExpr(__self_0),
CreateFunctionBody::AsReturnExpr(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateFunctionBody::AsReturnSelect(__self_0),
CreateFunctionBody::AsReturnSelect(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateFunctionBody {
#[inline]
fn partial_cmp(&self, other: &CreateFunctionBody)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CreateFunctionBody::AsBeforeOptions(__self_0),
CreateFunctionBody::AsBeforeOptions(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsAfterOptions(__self_0),
CreateFunctionBody::AsAfterOptions(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsBeginEnd(__self_0),
CreateFunctionBody::AsBeginEnd(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionBody::Return(__self_0),
CreateFunctionBody::Return(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsReturnExpr(__self_0),
CreateFunctionBody::AsReturnExpr(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsReturnSelect(__self_0),
CreateFunctionBody::AsReturnSelect(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateFunctionBody {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<BeginEndStatements>;
let _: ::core::cmp::AssertParamIsEq<Select>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateFunctionBody {
#[inline]
fn cmp(&self, other: &CreateFunctionBody) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CreateFunctionBody::AsBeforeOptions(__self_0),
CreateFunctionBody::AsBeforeOptions(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsAfterOptions(__self_0),
CreateFunctionBody::AsAfterOptions(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsBeginEnd(__self_0),
CreateFunctionBody::AsBeginEnd(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionBody::Return(__self_0),
CreateFunctionBody::Return(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsReturnExpr(__self_0),
CreateFunctionBody::AsReturnExpr(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionBody::AsReturnSelect(__self_0),
CreateFunctionBody::AsReturnSelect(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateFunctionBody {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CreateFunctionBody::AsBeforeOptions(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionBody::AsAfterOptions(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionBody::AsBeginEnd(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionBody::Return(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionBody::AsReturnExpr(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionBody::AsReturnSelect(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9419#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateFunctionBody {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AsBeforeOptions(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AsAfterOptions(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AsBeginEnd(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Return(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AsReturnExpr(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::AsReturnSelect(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateFunctionBody {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::AsBeforeOptions(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AsAfterOptions(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AsBeginEnd(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Return(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AsReturnExpr(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::AsReturnSelect(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9420pub enum CreateFunctionBody {
9421 AsBeforeOptions(Expr),
9433 AsAfterOptions(Expr),
9445 AsBeginEnd(BeginEndStatements),
9461 Return(Expr),
9472
9473 AsReturnExpr(Expr),
9484
9485 AsReturnSelect(Select),
9496}
9497
9498#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateFunctionUsing {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CreateFunctionUsing::Jar(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Jar",
&__self_0),
CreateFunctionUsing::File(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "File",
&__self_0),
CreateFunctionUsing::Archive(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Archive", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateFunctionUsing {
#[inline]
fn clone(&self) -> CreateFunctionUsing {
match self {
CreateFunctionUsing::Jar(__self_0) =>
CreateFunctionUsing::Jar(::core::clone::Clone::clone(__self_0)),
CreateFunctionUsing::File(__self_0) =>
CreateFunctionUsing::File(::core::clone::Clone::clone(__self_0)),
CreateFunctionUsing::Archive(__self_0) =>
CreateFunctionUsing::Archive(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateFunctionUsing {
#[inline]
fn eq(&self, other: &CreateFunctionUsing) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CreateFunctionUsing::Jar(__self_0),
CreateFunctionUsing::Jar(__arg1_0)) => __self_0 == __arg1_0,
(CreateFunctionUsing::File(__self_0),
CreateFunctionUsing::File(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateFunctionUsing::Archive(__self_0),
CreateFunctionUsing::Archive(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateFunctionUsing {
#[inline]
fn partial_cmp(&self, other: &CreateFunctionUsing)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CreateFunctionUsing::Jar(__self_0),
CreateFunctionUsing::Jar(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionUsing::File(__self_0),
CreateFunctionUsing::File(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateFunctionUsing::Archive(__self_0),
CreateFunctionUsing::Archive(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateFunctionUsing {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateFunctionUsing {
#[inline]
fn cmp(&self, other: &CreateFunctionUsing) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CreateFunctionUsing::Jar(__self_0),
CreateFunctionUsing::Jar(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionUsing::File(__self_0),
CreateFunctionUsing::File(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateFunctionUsing::Archive(__self_0),
CreateFunctionUsing::Archive(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateFunctionUsing {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CreateFunctionUsing::Jar(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionUsing::File(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateFunctionUsing::Archive(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9500#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateFunctionUsing {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Jar(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::File(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Archive(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateFunctionUsing {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Jar(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::File(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Archive(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9501pub enum CreateFunctionUsing {
9502 Jar(String),
9503 File(String),
9504 Archive(String),
9505}
9506
9507impl fmt::Display for CreateFunctionUsing {
9508 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9509 f.write_fmt(format_args!("USING "))write!(f, "USING ")?;
9510 match self {
9511 CreateFunctionUsing::Jar(uri) => f.write_fmt(format_args!("JAR \'{0}\'", uri))write!(f, "JAR '{uri}'"),
9512 CreateFunctionUsing::File(uri) => f.write_fmt(format_args!("FILE \'{0}\'", uri))write!(f, "FILE '{uri}'"),
9513 CreateFunctionUsing::Archive(uri) => f.write_fmt(format_args!("ARCHIVE \'{0}\'", uri))write!(f, "ARCHIVE '{uri}'"),
9514 }
9515 }
9516}
9517
9518#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MacroArg {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "MacroArg",
"name", &self.name, "default_expr", &&self.default_expr)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MacroArg {
#[inline]
fn clone(&self) -> MacroArg {
MacroArg {
name: ::core::clone::Clone::clone(&self.name),
default_expr: ::core::clone::Clone::clone(&self.default_expr),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MacroArg {
#[inline]
fn eq(&self, other: &MacroArg) -> bool {
self.name == other.name && self.default_expr == other.default_expr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MacroArg {
#[inline]
fn partial_cmp(&self, other: &MacroArg)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.default_expr,
&other.default_expr),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MacroArg {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MacroArg {
#[inline]
fn cmp(&self, other: &MacroArg) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.default_expr,
&other.default_expr),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MacroArg {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.default_expr, state)
}
}Hash)]
9523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9524#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MacroArg {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.default_expr, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MacroArg {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.default_expr, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9525pub struct MacroArg {
9526 pub name: Ident,
9527 pub default_expr: Option<Expr>,
9528}
9529
9530impl MacroArg {
9531 pub fn new(name: &str) -> Self {
9533 Self {
9534 name: name.into(),
9535 default_expr: None,
9536 }
9537 }
9538}
9539
9540impl fmt::Display for MacroArg {
9541 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9542 f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)?;
9543 if let Some(default_expr) = &self.default_expr {
9544 f.write_fmt(format_args!(" := {0}", default_expr))write!(f, " := {default_expr}")?;
9545 }
9546 Ok(())
9547 }
9548}
9549
9550#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MacroDefinition {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
MacroDefinition::Expr(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
&__self_0),
MacroDefinition::Table(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Table",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MacroDefinition {
#[inline]
fn clone(&self) -> MacroDefinition {
match self {
MacroDefinition::Expr(__self_0) =>
MacroDefinition::Expr(::core::clone::Clone::clone(__self_0)),
MacroDefinition::Table(__self_0) =>
MacroDefinition::Table(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MacroDefinition {
#[inline]
fn eq(&self, other: &MacroDefinition) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(MacroDefinition::Expr(__self_0),
MacroDefinition::Expr(__arg1_0)) => __self_0 == __arg1_0,
(MacroDefinition::Table(__self_0),
MacroDefinition::Table(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MacroDefinition {
#[inline]
fn partial_cmp(&self, other: &MacroDefinition)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(MacroDefinition::Expr(__self_0), MacroDefinition::Expr(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(MacroDefinition::Table(__self_0),
MacroDefinition::Table(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MacroDefinition {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MacroDefinition {
#[inline]
fn cmp(&self, other: &MacroDefinition) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(MacroDefinition::Expr(__self_0),
MacroDefinition::Expr(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(MacroDefinition::Table(__self_0),
MacroDefinition::Table(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MacroDefinition {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
MacroDefinition::Expr(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
MacroDefinition::Table(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9552#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MacroDefinition {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Table(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MacroDefinition {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Table(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9553pub enum MacroDefinition {
9554 Expr(Expr),
9555 Table(Box<Query>),
9556}
9557
9558impl fmt::Display for MacroDefinition {
9559 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9560 match self {
9561 MacroDefinition::Expr(expr) => f.write_fmt(format_args!("{0}", expr))write!(f, "{expr}")?,
9562 MacroDefinition::Table(query) => f.write_fmt(format_args!("{0}", query))write!(f, "{query}")?,
9563 }
9564 Ok(())
9565 }
9566}
9567
9568#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SchemaName {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
SchemaName::Simple(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Simple",
&__self_0),
SchemaName::UnnamedAuthorization(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"UnnamedAuthorization", &__self_0),
SchemaName::NamedAuthorization(__self_0, __self_1) =>
::core::fmt::Formatter::debug_tuple_field2_finish(f,
"NamedAuthorization", __self_0, &__self_1),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SchemaName {
#[inline]
fn clone(&self) -> SchemaName {
match self {
SchemaName::Simple(__self_0) =>
SchemaName::Simple(::core::clone::Clone::clone(__self_0)),
SchemaName::UnnamedAuthorization(__self_0) =>
SchemaName::UnnamedAuthorization(::core::clone::Clone::clone(__self_0)),
SchemaName::NamedAuthorization(__self_0, __self_1) =>
SchemaName::NamedAuthorization(::core::clone::Clone::clone(__self_0),
::core::clone::Clone::clone(__self_1)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SchemaName {
#[inline]
fn eq(&self, other: &SchemaName) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(SchemaName::Simple(__self_0), SchemaName::Simple(__arg1_0))
=> __self_0 == __arg1_0,
(SchemaName::UnnamedAuthorization(__self_0),
SchemaName::UnnamedAuthorization(__arg1_0)) =>
__self_0 == __arg1_0,
(SchemaName::NamedAuthorization(__self_0, __self_1),
SchemaName::NamedAuthorization(__arg1_0, __arg1_1)) =>
__self_0 == __arg1_0 && __self_1 == __arg1_1,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SchemaName {
#[inline]
fn partial_cmp(&self, other: &SchemaName)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(SchemaName::Simple(__self_0), SchemaName::Simple(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SchemaName::UnnamedAuthorization(__self_0),
SchemaName::UnnamedAuthorization(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SchemaName::NamedAuthorization(__self_0, __self_1),
SchemaName::NamedAuthorization(__arg1_0, __arg1_1)) =>
match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=> ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SchemaName {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SchemaName {
#[inline]
fn cmp(&self, other: &SchemaName) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(SchemaName::Simple(__self_0), SchemaName::Simple(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SchemaName::UnnamedAuthorization(__self_0),
SchemaName::UnnamedAuthorization(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SchemaName::NamedAuthorization(__self_0, __self_1),
SchemaName::NamedAuthorization(__arg1_0, __arg1_1)) =>
match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(__self_1, __arg1_1),
cmp => cmp,
},
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SchemaName {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
SchemaName::Simple(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SchemaName::UnnamedAuthorization(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SchemaName::NamedAuthorization(__self_0, __self_1) => {
::core::hash::Hash::hash(__self_0, state);
::core::hash::Hash::hash(__self_1, state)
}
}
}
}Hash)]
9572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9573#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SchemaName {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Simple(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::UnnamedAuthorization(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::NamedAuthorization(_0, _1) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
sqlparser::ast::Visit::visit(_1, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SchemaName {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Simple(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::UnnamedAuthorization(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::NamedAuthorization(_0, _1) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
sqlparser::ast::VisitMut::visit(_1, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9574pub enum SchemaName {
9575 Simple(ObjectName),
9577 UnnamedAuthorization(Ident),
9579 NamedAuthorization(ObjectName, Ident),
9581}
9582
9583impl fmt::Display for SchemaName {
9584 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9585 match self {
9586 SchemaName::Simple(name) => {
9587 f.write_fmt(format_args!("{0}", name))write!(f, "{name}")
9588 }
9589 SchemaName::UnnamedAuthorization(authorization) => {
9590 f.write_fmt(format_args!("AUTHORIZATION {0}", authorization))write!(f, "AUTHORIZATION {authorization}")
9591 }
9592 SchemaName::NamedAuthorization(name, authorization) => {
9593 f.write_fmt(format_args!("{0} AUTHORIZATION {1}", name, authorization))write!(f, "{name} AUTHORIZATION {authorization}")
9594 }
9595 }
9596 }
9597}
9598
9599#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SearchModifier {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
SearchModifier::InNaturalLanguageMode =>
"InNaturalLanguageMode",
SearchModifier::InNaturalLanguageModeWithQueryExpansion =>
"InNaturalLanguageModeWithQueryExpansion",
SearchModifier::InBooleanMode => "InBooleanMode",
SearchModifier::WithQueryExpansion => "WithQueryExpansion",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SearchModifier {
#[inline]
fn clone(&self) -> SearchModifier {
match self {
SearchModifier::InNaturalLanguageMode =>
SearchModifier::InNaturalLanguageMode,
SearchModifier::InNaturalLanguageModeWithQueryExpansion =>
SearchModifier::InNaturalLanguageModeWithQueryExpansion,
SearchModifier::InBooleanMode => SearchModifier::InBooleanMode,
SearchModifier::WithQueryExpansion =>
SearchModifier::WithQueryExpansion,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SearchModifier {
#[inline]
fn eq(&self, other: &SearchModifier) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SearchModifier {
#[inline]
fn partial_cmp(&self, other: &SearchModifier)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SearchModifier {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SearchModifier {
#[inline]
fn cmp(&self, other: &SearchModifier) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SearchModifier {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9604#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SearchModifier {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::InNaturalLanguageMode => {}
Self::InNaturalLanguageModeWithQueryExpansion => {}
Self::InBooleanMode => {}
Self::WithQueryExpansion => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SearchModifier {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::InNaturalLanguageMode => {}
Self::InNaturalLanguageModeWithQueryExpansion => {}
Self::InBooleanMode => {}
Self::WithQueryExpansion => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9605pub enum SearchModifier {
9606 InNaturalLanguageMode,
9608 InNaturalLanguageModeWithQueryExpansion,
9610 InBooleanMode,
9612 WithQueryExpansion,
9614}
9615
9616impl fmt::Display for SearchModifier {
9617 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9618 match self {
9619 Self::InNaturalLanguageMode => {
9620 f.write_fmt(format_args!("IN NATURAL LANGUAGE MODE"))write!(f, "IN NATURAL LANGUAGE MODE")?;
9621 }
9622 Self::InNaturalLanguageModeWithQueryExpansion => {
9623 f.write_fmt(format_args!("IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION"))write!(f, "IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION")?;
9624 }
9625 Self::InBooleanMode => {
9626 f.write_fmt(format_args!("IN BOOLEAN MODE"))write!(f, "IN BOOLEAN MODE")?;
9627 }
9628 Self::WithQueryExpansion => {
9629 f.write_fmt(format_args!("WITH QUERY EXPANSION"))write!(f, "WITH QUERY EXPANSION")?;
9630 }
9631 }
9632
9633 Ok(())
9634 }
9635}
9636
9637#[derive(#[automatically_derived]
impl ::core::fmt::Debug for LockTable {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "LockTable",
"table", &self.table, "alias", &self.alias, "lock_type",
&&self.lock_type)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for LockTable {
#[inline]
fn clone(&self) -> LockTable {
LockTable {
table: ::core::clone::Clone::clone(&self.table),
alias: ::core::clone::Clone::clone(&self.alias),
lock_type: ::core::clone::Clone::clone(&self.lock_type),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for LockTable {
#[inline]
fn eq(&self, other: &LockTable) -> bool {
self.table == other.table && self.alias == other.alias &&
self.lock_type == other.lock_type
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for LockTable {
#[inline]
fn partial_cmp(&self, other: &LockTable)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.table, &other.table)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.alias,
&other.alias) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.lock_type,
&other.lock_type),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for LockTable {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<LockTableType>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for LockTable {
#[inline]
fn cmp(&self, other: &LockTable) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.table, &other.table) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.alias, &other.alias) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.lock_type, &other.lock_type),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for LockTable {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.table, state);
::core::hash::Hash::hash(&self.alias, state);
::core::hash::Hash::hash(&self.lock_type, state)
}
}Hash)]
9638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9639#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for LockTable {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.table, visitor)?;
sqlparser::ast::Visit::visit(&self.alias, visitor)?;
sqlparser::ast::Visit::visit(&self.lock_type, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for LockTable {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.table, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.alias, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.lock_type, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9640pub struct LockTable {
9641 pub table: Ident,
9642 pub alias: Option<Ident>,
9643 pub lock_type: LockTableType,
9644}
9645
9646impl fmt::Display for LockTable {
9647 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9648 let Self {
9649 table: tbl_name,
9650 alias,
9651 lock_type,
9652 } = self;
9653
9654 f.write_fmt(format_args!("{0} ", tbl_name))write!(f, "{tbl_name} ")?;
9655 if let Some(alias) = alias {
9656 f.write_fmt(format_args!("AS {0} ", alias))write!(f, "AS {alias} ")?;
9657 }
9658 f.write_fmt(format_args!("{0}", lock_type))write!(f, "{lock_type}")?;
9659 Ok(())
9660 }
9661}
9662
9663#[derive(#[automatically_derived]
impl ::core::fmt::Debug for LockTableType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
LockTableType::Read { local: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Read",
"local", &__self_0),
LockTableType::Write { low_priority: __self_0 } =>
::core::fmt::Formatter::debug_struct_field1_finish(f, "Write",
"low_priority", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for LockTableType {
#[inline]
fn clone(&self) -> LockTableType {
match self {
LockTableType::Read { local: __self_0 } =>
LockTableType::Read {
local: ::core::clone::Clone::clone(__self_0),
},
LockTableType::Write { low_priority: __self_0 } =>
LockTableType::Write {
low_priority: ::core::clone::Clone::clone(__self_0),
},
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for LockTableType {
#[inline]
fn eq(&self, other: &LockTableType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(LockTableType::Read { local: __self_0 },
LockTableType::Read { local: __arg1_0 }) =>
__self_0 == __arg1_0,
(LockTableType::Write { low_priority: __self_0 },
LockTableType::Write { low_priority: __arg1_0 }) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for LockTableType {
#[inline]
fn partial_cmp(&self, other: &LockTableType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(LockTableType::Read { local: __self_0 }, LockTableType::Read {
local: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(LockTableType::Write { low_priority: __self_0 },
LockTableType::Write { low_priority: __arg1_0 }) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for LockTableType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for LockTableType {
#[inline]
fn cmp(&self, other: &LockTableType) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(LockTableType::Read { local: __self_0 },
LockTableType::Read { local: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(LockTableType::Write { low_priority: __self_0 },
LockTableType::Write { low_priority: __arg1_0 }) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for LockTableType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
LockTableType::Read { local: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
LockTableType::Write { low_priority: __self_0 } =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9665#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for LockTableType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Read { local } => {
sqlparser::ast::Visit::visit(local, visitor)?;
}
Self::Write { low_priority } => {
sqlparser::ast::Visit::visit(low_priority, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for LockTableType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Read { local } => {
sqlparser::ast::VisitMut::visit(local, visitor)?;
}
Self::Write { low_priority } => {
sqlparser::ast::VisitMut::visit(low_priority, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9666pub enum LockTableType {
9667 Read { local: bool },
9668 Write { low_priority: bool },
9669}
9670
9671impl fmt::Display for LockTableType {
9672 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9673 match self {
9674 Self::Read { local } => {
9675 f.write_fmt(format_args!("READ"))write!(f, "READ")?;
9676 if *local {
9677 f.write_fmt(format_args!(" LOCAL"))write!(f, " LOCAL")?;
9678 }
9679 }
9680 Self::Write { low_priority } => {
9681 if *low_priority {
9682 f.write_fmt(format_args!("LOW_PRIORITY "))write!(f, "LOW_PRIORITY ")?;
9683 }
9684 f.write_fmt(format_args!("WRITE"))write!(f, "WRITE")?;
9685 }
9686 }
9687
9688 Ok(())
9689 }
9690}
9691
9692#[derive(#[automatically_derived]
impl ::core::fmt::Debug for HiveSetLocation {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"HiveSetLocation", "has_set", &self.has_set, "location",
&&self.location)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for HiveSetLocation {
#[inline]
fn clone(&self) -> HiveSetLocation {
HiveSetLocation {
has_set: ::core::clone::Clone::clone(&self.has_set),
location: ::core::clone::Clone::clone(&self.location),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for HiveSetLocation {
#[inline]
fn eq(&self, other: &HiveSetLocation) -> bool {
self.has_set == other.has_set && self.location == other.location
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for HiveSetLocation {
#[inline]
fn partial_cmp(&self, other: &HiveSetLocation)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.has_set,
&other.has_set) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.location,
&other.location),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for HiveSetLocation {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for HiveSetLocation {
#[inline]
fn cmp(&self, other: &HiveSetLocation) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.has_set, &other.has_set) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.location, &other.location),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for HiveSetLocation {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.has_set, state);
::core::hash::Hash::hash(&self.location, state)
}
}Hash)]
9693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9694#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for HiveSetLocation {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.has_set, visitor)?;
sqlparser::ast::Visit::visit(&self.location, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for HiveSetLocation {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.has_set, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.location, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9695pub struct HiveSetLocation {
9696 pub has_set: bool,
9697 pub location: Ident,
9698}
9699
9700impl fmt::Display for HiveSetLocation {
9701 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9702 if self.has_set {
9703 f.write_fmt(format_args!("SET "))write!(f, "SET ")?;
9704 }
9705 f.write_fmt(format_args!("LOCATION {0}", self.location))write!(f, "LOCATION {}", self.location)
9706 }
9707}
9708
9709#[allow(clippy::large_enum_variant)]
9711#[derive(#[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::fmt::Debug for MySQLColumnPosition {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
MySQLColumnPosition::First =>
::core::fmt::Formatter::write_str(f, "First"),
MySQLColumnPosition::After(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "After",
&__self_0),
}
}
}Debug, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::clone::Clone for MySQLColumnPosition {
#[inline]
fn clone(&self) -> MySQLColumnPosition {
match self {
MySQLColumnPosition::First => MySQLColumnPosition::First,
MySQLColumnPosition::After(__self_0) =>
MySQLColumnPosition::After(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::PartialEq for MySQLColumnPosition {
#[inline]
fn eq(&self, other: &MySQLColumnPosition) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(MySQLColumnPosition::After(__self_0),
MySQLColumnPosition::After(__arg1_0)) =>
__self_0 == __arg1_0,
_ => true,
}
}
}PartialEq, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::PartialOrd for MySQLColumnPosition {
#[inline]
fn partial_cmp(&self, other: &MySQLColumnPosition)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(MySQLColumnPosition::After(__self_0),
MySQLColumnPosition::After(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::Eq for MySQLColumnPosition {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::cmp::Ord for MySQLColumnPosition {
#[inline]
fn cmp(&self, other: &MySQLColumnPosition) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(MySQLColumnPosition::After(__self_0),
MySQLColumnPosition::After(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => ::core::cmp::Ordering::Equal,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
#[allow(clippy::large_enum_variant)]
impl ::core::hash::Hash for MySQLColumnPosition {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
MySQLColumnPosition::After(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
_ => {}
}
}
}Hash)]
9712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9713#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MySQLColumnPosition {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::First => {}
Self::After(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MySQLColumnPosition {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::First => {}
Self::After(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9714pub enum MySQLColumnPosition {
9715 First,
9716 After(Ident),
9717}
9718
9719impl Display for MySQLColumnPosition {
9720 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9721 match self {
9722 MySQLColumnPosition::First => f.write_fmt(format_args!("FIRST"))write!(f, "FIRST"),
9723 MySQLColumnPosition::After(ident) => {
9724 let column_name = &ident.value;
9725 f.write_fmt(format_args!("AFTER {0}", column_name))write!(f, "AFTER {column_name}")
9726 }
9727 }
9728 }
9729}
9730
9731#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateViewAlgorithm {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CreateViewAlgorithm::Undefined => "Undefined",
CreateViewAlgorithm::Merge => "Merge",
CreateViewAlgorithm::TempTable => "TempTable",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateViewAlgorithm {
#[inline]
fn clone(&self) -> CreateViewAlgorithm {
match self {
CreateViewAlgorithm::Undefined => CreateViewAlgorithm::Undefined,
CreateViewAlgorithm::Merge => CreateViewAlgorithm::Merge,
CreateViewAlgorithm::TempTable => CreateViewAlgorithm::TempTable,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateViewAlgorithm {
#[inline]
fn eq(&self, other: &CreateViewAlgorithm) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateViewAlgorithm {
#[inline]
fn partial_cmp(&self, other: &CreateViewAlgorithm)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateViewAlgorithm {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateViewAlgorithm {
#[inline]
fn cmp(&self, other: &CreateViewAlgorithm) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateViewAlgorithm {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9734#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateViewAlgorithm {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Undefined => {}
Self::Merge => {}
Self::TempTable => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateViewAlgorithm {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Undefined => {}
Self::Merge => {}
Self::TempTable => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9735pub enum CreateViewAlgorithm {
9736 Undefined,
9737 Merge,
9738 TempTable,
9739}
9740
9741impl Display for CreateViewAlgorithm {
9742 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9743 match self {
9744 CreateViewAlgorithm::Undefined => f.write_fmt(format_args!("UNDEFINED"))write!(f, "UNDEFINED"),
9745 CreateViewAlgorithm::Merge => f.write_fmt(format_args!("MERGE"))write!(f, "MERGE"),
9746 CreateViewAlgorithm::TempTable => f.write_fmt(format_args!("TEMPTABLE"))write!(f, "TEMPTABLE"),
9747 }
9748 }
9749}
9750#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateViewSecurity {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CreateViewSecurity::Definer => "Definer",
CreateViewSecurity::Invoker => "Invoker",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateViewSecurity {
#[inline]
fn clone(&self) -> CreateViewSecurity {
match self {
CreateViewSecurity::Definer => CreateViewSecurity::Definer,
CreateViewSecurity::Invoker => CreateViewSecurity::Invoker,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateViewSecurity {
#[inline]
fn eq(&self, other: &CreateViewSecurity) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateViewSecurity {
#[inline]
fn partial_cmp(&self, other: &CreateViewSecurity)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateViewSecurity {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateViewSecurity {
#[inline]
fn cmp(&self, other: &CreateViewSecurity) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateViewSecurity {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
9752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9753#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateViewSecurity {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Definer => {} Self::Invoker => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateViewSecurity {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Definer => {} Self::Invoker => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9754pub enum CreateViewSecurity {
9755 Definer,
9756 Invoker,
9757}
9758
9759impl Display for CreateViewSecurity {
9760 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9761 match self {
9762 CreateViewSecurity::Definer => f.write_fmt(format_args!("DEFINER"))write!(f, "DEFINER"),
9763 CreateViewSecurity::Invoker => f.write_fmt(format_args!("INVOKER"))write!(f, "INVOKER"),
9764 }
9765 }
9766}
9767
9768#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateViewParams {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"CreateViewParams", "algorithm", &self.algorithm, "definer",
&self.definer, "security", &&self.security)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateViewParams {
#[inline]
fn clone(&self) -> CreateViewParams {
CreateViewParams {
algorithm: ::core::clone::Clone::clone(&self.algorithm),
definer: ::core::clone::Clone::clone(&self.definer),
security: ::core::clone::Clone::clone(&self.security),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateViewParams {
#[inline]
fn eq(&self, other: &CreateViewParams) -> bool {
self.algorithm == other.algorithm && self.definer == other.definer &&
self.security == other.security
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateViewParams {
#[inline]
fn partial_cmp(&self, other: &CreateViewParams)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.algorithm,
&other.algorithm) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.definer,
&other.definer) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.security,
&other.security),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateViewParams {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<CreateViewAlgorithm>>;
let _: ::core::cmp::AssertParamIsEq<Option<GranteeName>>;
let _: ::core::cmp::AssertParamIsEq<Option<CreateViewSecurity>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateViewParams {
#[inline]
fn cmp(&self, other: &CreateViewParams) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.algorithm, &other.algorithm) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.definer, &other.definer) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.security, &other.security),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateViewParams {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.algorithm, state);
::core::hash::Hash::hash(&self.definer, state);
::core::hash::Hash::hash(&self.security, state)
}
}Hash)]
9772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9773#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateViewParams {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.algorithm, visitor)?;
sqlparser::ast::Visit::visit(&self.definer, visitor)?;
sqlparser::ast::Visit::visit(&self.security, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateViewParams {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.algorithm, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.definer, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.security, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9774pub struct CreateViewParams {
9775 pub algorithm: Option<CreateViewAlgorithm>,
9776 pub definer: Option<GranteeName>,
9777 pub security: Option<CreateViewSecurity>,
9778}
9779
9780impl Display for CreateViewParams {
9781 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9782 let CreateViewParams {
9783 algorithm,
9784 definer,
9785 security,
9786 } = self;
9787 if let Some(algorithm) = algorithm {
9788 f.write_fmt(format_args!("ALGORITHM = {0} ", algorithm))write!(f, "ALGORITHM = {algorithm} ")?;
9789 }
9790 if let Some(definers) = definer {
9791 f.write_fmt(format_args!("DEFINER = {0} ", definers))write!(f, "DEFINER = {definers} ")?;
9792 }
9793 if let Some(security) = security {
9794 f.write_fmt(format_args!("SQL SECURITY {0} ", security))write!(f, "SQL SECURITY {security} ")?;
9795 }
9796 Ok(())
9797 }
9798}
9799
9800#[derive(#[automatically_derived]
impl ::core::fmt::Debug for NamedParenthesizedList {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"NamedParenthesizedList", "key", &self.key, "name", &self.name,
"values", &&self.values)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for NamedParenthesizedList {
#[inline]
fn clone(&self) -> NamedParenthesizedList {
NamedParenthesizedList {
key: ::core::clone::Clone::clone(&self.key),
name: ::core::clone::Clone::clone(&self.name),
values: ::core::clone::Clone::clone(&self.values),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for NamedParenthesizedList {
#[inline]
fn eq(&self, other: &NamedParenthesizedList) -> bool {
self.key == other.key && self.name == other.name &&
self.values == other.values
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for NamedParenthesizedList {
#[inline]
fn partial_cmp(&self, other: &NamedParenthesizedList)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.key, &other.key) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.name,
&other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.values,
&other.values),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for NamedParenthesizedList {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for NamedParenthesizedList {
#[inline]
fn cmp(&self, other: &NamedParenthesizedList) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.key, &other.key) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.values, &other.values),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for NamedParenthesizedList {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.key, state);
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.values, state)
}
}Hash)]
9801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9802#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for NamedParenthesizedList {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.key, visitor)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.values, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for NamedParenthesizedList {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.key, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.values, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9803pub struct NamedParenthesizedList {
9811 pub key: Ident,
9812 pub name: Option<Ident>,
9813 pub values: Vec<Ident>,
9814}
9815
9816#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RowAccessPolicy {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"RowAccessPolicy", "policy", &self.policy, "on", &&self.on)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RowAccessPolicy {
#[inline]
fn clone(&self) -> RowAccessPolicy {
RowAccessPolicy {
policy: ::core::clone::Clone::clone(&self.policy),
on: ::core::clone::Clone::clone(&self.on),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RowAccessPolicy {
#[inline]
fn eq(&self, other: &RowAccessPolicy) -> bool {
self.policy == other.policy && self.on == other.on
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RowAccessPolicy {
#[inline]
fn partial_cmp(&self, other: &RowAccessPolicy)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.policy,
&other.policy) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.on, &other.on),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RowAccessPolicy {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RowAccessPolicy {
#[inline]
fn cmp(&self, other: &RowAccessPolicy) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.policy, &other.policy) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.on, &other.on),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RowAccessPolicy {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.policy, state);
::core::hash::Hash::hash(&self.on, state)
}
}Hash)]
9821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9822#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RowAccessPolicy {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.policy, visitor)?;
sqlparser::ast::Visit::visit(&self.on, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for RowAccessPolicy {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.policy, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.on, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9823pub struct RowAccessPolicy {
9824 pub policy: ObjectName,
9825 pub on: Vec<Ident>,
9826}
9827
9828impl RowAccessPolicy {
9829 pub fn new(policy: ObjectName, on: Vec<Ident>) -> Self {
9830 Self { policy, on }
9831 }
9832}
9833
9834impl Display for RowAccessPolicy {
9835 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
9836 f.write_fmt(format_args!("WITH ROW ACCESS POLICY {0} ON ({1})", self.policy,
display_comma_separated(self.on.as_slice())))write!(
9837 f,
9838 "WITH ROW ACCESS POLICY {} ON ({})",
9839 self.policy,
9840 display_comma_separated(self.on.as_slice())
9841 )
9842 }
9843}
9844
9845#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Tag {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "Tag", "key",
&self.key, "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Tag {
#[inline]
fn clone(&self) -> Tag {
Tag {
key: ::core::clone::Clone::clone(&self.key),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Tag {
#[inline]
fn eq(&self, other: &Tag) -> bool {
self.key == other.key && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Tag {
#[inline]
fn partial_cmp(&self, other: &Tag)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.key, &other.key) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Tag {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Tag {
#[inline]
fn cmp(&self, other: &Tag) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.key, &other.key) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Tag {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.key, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
9849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9850#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Tag {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.key, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for Tag {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.key, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9851pub struct Tag {
9852 pub key: ObjectName,
9853 pub value: String,
9854}
9855
9856impl Tag {
9857 pub fn new(key: ObjectName, value: String) -> Self {
9858 Self { key, value }
9859 }
9860}
9861
9862impl Display for Tag {
9863 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9864 f.write_fmt(format_args!("{0}=\'{1}\'", self.key, self.value))write!(f, "{}='{}'", self.key, self.value)
9865 }
9866}
9867
9868#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ContactEntry {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "ContactEntry",
"purpose", &self.purpose, "contact", &&self.contact)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ContactEntry {
#[inline]
fn clone(&self) -> ContactEntry {
ContactEntry {
purpose: ::core::clone::Clone::clone(&self.purpose),
contact: ::core::clone::Clone::clone(&self.contact),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ContactEntry {
#[inline]
fn eq(&self, other: &ContactEntry) -> bool {
self.purpose == other.purpose && self.contact == other.contact
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ContactEntry {
#[inline]
fn partial_cmp(&self, other: &ContactEntry)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.purpose,
&other.purpose) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.contact,
&other.contact),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ContactEntry {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ContactEntry {
#[inline]
fn cmp(&self, other: &ContactEntry) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.purpose, &other.purpose) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.contact, &other.contact),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ContactEntry {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.purpose, state);
::core::hash::Hash::hash(&self.contact, state)
}
}Hash)]
9872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9873#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ContactEntry {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.purpose, visitor)?;
sqlparser::ast::Visit::visit(&self.contact, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ContactEntry {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.purpose, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.contact, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9874pub struct ContactEntry {
9875 pub purpose: String,
9876 pub contact: String,
9877}
9878
9879impl Display for ContactEntry {
9880 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9881 f.write_fmt(format_args!("{0} = {1}", self.purpose, self.contact))write!(f, "{} = {}", self.purpose, self.contact)
9882 }
9883}
9884
9885#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CommentDef {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CommentDef::WithEq(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "WithEq",
&__self_0),
CommentDef::WithoutEq(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"WithoutEq", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CommentDef {
#[inline]
fn clone(&self) -> CommentDef {
match self {
CommentDef::WithEq(__self_0) =>
CommentDef::WithEq(::core::clone::Clone::clone(__self_0)),
CommentDef::WithoutEq(__self_0) =>
CommentDef::WithoutEq(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CommentDef {
#[inline]
fn eq(&self, other: &CommentDef) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CommentDef::WithEq(__self_0), CommentDef::WithEq(__arg1_0))
=> __self_0 == __arg1_0,
(CommentDef::WithoutEq(__self_0),
CommentDef::WithoutEq(__arg1_0)) => __self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CommentDef {
#[inline]
fn partial_cmp(&self, other: &CommentDef)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CommentDef::WithEq(__self_0), CommentDef::WithEq(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CommentDef::WithoutEq(__self_0), CommentDef::WithoutEq(__arg1_0))
=> ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CommentDef {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CommentDef {
#[inline]
fn cmp(&self, other: &CommentDef) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CommentDef::WithEq(__self_0), CommentDef::WithEq(__arg1_0))
=> ::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CommentDef::WithoutEq(__self_0),
CommentDef::WithoutEq(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CommentDef {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CommentDef::WithEq(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CommentDef::WithoutEq(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9888#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CommentDef {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::WithEq(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::WithoutEq(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CommentDef {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::WithEq(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::WithoutEq(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9889pub enum CommentDef {
9890 WithEq(String),
9893 WithoutEq(String),
9894}
9895
9896impl Display for CommentDef {
9897 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9898 match self {
9899 CommentDef::WithEq(comment) | CommentDef::WithoutEq(comment) => f.write_fmt(format_args!("{0}", comment))write!(f, "{comment}"),
9900 }
9901 }
9902}
9903
9904#[derive(#[automatically_derived]
impl<T: ::core::fmt::Debug> ::core::fmt::Debug for WrappedCollection<T> {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
WrappedCollection::NoWrapping(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"NoWrapping", &__self_0),
WrappedCollection::Parentheses(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Parentheses", &__self_0),
}
}
}Debug, #[automatically_derived]
impl<T: ::core::clone::Clone> ::core::clone::Clone for WrappedCollection<T> {
#[inline]
fn clone(&self) -> WrappedCollection<T> {
match self {
WrappedCollection::NoWrapping(__self_0) =>
WrappedCollection::NoWrapping(::core::clone::Clone::clone(__self_0)),
WrappedCollection::Parentheses(__self_0) =>
WrappedCollection::Parentheses(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl<T: ::core::cmp::PartialEq> ::core::cmp::PartialEq for
WrappedCollection<T> {
#[inline]
fn eq(&self, other: &WrappedCollection<T>) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(WrappedCollection::NoWrapping(__self_0),
WrappedCollection::NoWrapping(__arg1_0)) =>
__self_0 == __arg1_0,
(WrappedCollection::Parentheses(__self_0),
WrappedCollection::Parentheses(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl<T: ::core::cmp::PartialOrd> ::core::cmp::PartialOrd for
WrappedCollection<T> {
#[inline]
fn partial_cmp(&self, other: &WrappedCollection<T>)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(WrappedCollection::NoWrapping(__self_0),
WrappedCollection::NoWrapping(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(WrappedCollection::Parentheses(__self_0),
WrappedCollection::Parentheses(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl<T: ::core::cmp::Eq> ::core::cmp::Eq for WrappedCollection<T> {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<T>;
}
}Eq, #[automatically_derived]
impl<T: ::core::cmp::Ord> ::core::cmp::Ord for WrappedCollection<T> {
#[inline]
fn cmp(&self, other: &WrappedCollection<T>) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(WrappedCollection::NoWrapping(__self_0),
WrappedCollection::NoWrapping(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(WrappedCollection::Parentheses(__self_0),
WrappedCollection::Parentheses(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl<T: ::core::hash::Hash> ::core::hash::Hash for WrappedCollection<T> {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
WrappedCollection::NoWrapping(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
WrappedCollection::Parentheses(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
9919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9920#[cfg_attr(feature = "visitor", derive(impl<T: sqlparser::ast::Visit> sqlparser::ast::Visit for WrappedCollection<T>
{
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::NoWrapping(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Parentheses(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl<T: sqlparser::ast::VisitMut> sqlparser::ast::VisitMut for
WrappedCollection<T> {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::NoWrapping(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Parentheses(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9921pub enum WrappedCollection<T> {
9922 NoWrapping(T),
9924 Parentheses(T),
9926}
9927
9928impl<T> Display for WrappedCollection<Vec<T>>
9929where
9930 T: Display,
9931{
9932 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9933 match self {
9934 WrappedCollection::NoWrapping(inner) => {
9935 f.write_fmt(format_args!("{0}", display_comma_separated(inner.as_slice())))write!(f, "{}", display_comma_separated(inner.as_slice()))
9936 }
9937 WrappedCollection::Parentheses(inner) => {
9938 f.write_fmt(format_args!("({0})", display_comma_separated(inner.as_slice())))write!(f, "({})", display_comma_separated(inner.as_slice()))
9939 }
9940 }
9941 }
9942}
9943
9944#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UtilityOption {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "UtilityOption",
"name", &self.name, "arg", &&self.arg)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UtilityOption {
#[inline]
fn clone(&self) -> UtilityOption {
UtilityOption {
name: ::core::clone::Clone::clone(&self.name),
arg: ::core::clone::Clone::clone(&self.arg),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UtilityOption {
#[inline]
fn eq(&self, other: &UtilityOption) -> bool {
self.name == other.name && self.arg == other.arg
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UtilityOption {
#[inline]
fn partial_cmp(&self, other: &UtilityOption)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.arg, &other.arg),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UtilityOption {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UtilityOption {
#[inline]
fn cmp(&self, other: &UtilityOption) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.arg, &other.arg),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UtilityOption {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.arg, state)
}
}Hash)]
9968#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9969#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UtilityOption {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.arg, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for UtilityOption {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.arg, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9970pub struct UtilityOption {
9971 pub name: Ident,
9972 pub arg: Option<Expr>,
9973}
9974
9975impl Display for UtilityOption {
9976 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9977 if let Some(ref arg) = self.arg {
9978 f.write_fmt(format_args!("{0} {1}", self.name, arg))write!(f, "{} {}", self.name, arg)
9979 } else {
9980 f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)
9981 }
9982 }
9983}
9984
9985#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowStatementOptions {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field5_finish(f,
"ShowStatementOptions", "show_in", &self.show_in, "starts_with",
&self.starts_with, "limit", &self.limit, "limit_from",
&self.limit_from, "filter_position", &&self.filter_position)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowStatementOptions {
#[inline]
fn clone(&self) -> ShowStatementOptions {
ShowStatementOptions {
show_in: ::core::clone::Clone::clone(&self.show_in),
starts_with: ::core::clone::Clone::clone(&self.starts_with),
limit: ::core::clone::Clone::clone(&self.limit),
limit_from: ::core::clone::Clone::clone(&self.limit_from),
filter_position: ::core::clone::Clone::clone(&self.filter_position),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowStatementOptions {
#[inline]
fn eq(&self, other: &ShowStatementOptions) -> bool {
self.show_in == other.show_in && self.starts_with == other.starts_with
&& self.limit == other.limit &&
self.limit_from == other.limit_from &&
self.filter_position == other.filter_position
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowStatementOptions {
#[inline]
fn partial_cmp(&self, other: &ShowStatementOptions)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.show_in,
&other.show_in) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.starts_with,
&other.starts_with) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.limit,
&other.limit) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.limit_from,
&other.limit_from) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.filter_position,
&other.filter_position),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowStatementOptions {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<ShowStatementIn>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
let _:
::core::cmp::AssertParamIsEq<Option<ShowStatementFilterPosition>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowStatementOptions {
#[inline]
fn cmp(&self, other: &ShowStatementOptions) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.show_in, &other.show_in) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.starts_with,
&other.starts_with) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.limit, &other.limit) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.limit_from,
&other.limit_from) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.filter_position,
&other.filter_position),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowStatementOptions {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.show_in, state);
::core::hash::Hash::hash(&self.starts_with, state);
::core::hash::Hash::hash(&self.limit, state);
::core::hash::Hash::hash(&self.limit_from, state);
::core::hash::Hash::hash(&self.filter_position, state)
}
}Hash)]
9989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9990#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowStatementOptions {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.show_in, visitor)?;
sqlparser::ast::Visit::visit(&self.starts_with, visitor)?;
sqlparser::ast::Visit::visit(&self.limit, visitor)?;
sqlparser::ast::Visit::visit(&self.limit_from, visitor)?;
sqlparser::ast::Visit::visit(&self.filter_position, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowStatementOptions {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.show_in, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.starts_with, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.limit, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.limit_from, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.filter_position, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
9991pub struct ShowStatementOptions {
9992 pub show_in: Option<ShowStatementIn>,
9993 pub starts_with: Option<Value>,
9994 pub limit: Option<Expr>,
9995 pub limit_from: Option<Value>,
9996 pub filter_position: Option<ShowStatementFilterPosition>,
9997}
9998
9999impl Display for ShowStatementOptions {
10000 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10001 let (like_in_infix, like_in_suffix) = match &self.filter_position {
10002 Some(ShowStatementFilterPosition::Infix(filter)) => {
10003 (::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" {0}", filter))
})format!(" {filter}"), "".to_string())
10004 }
10005 Some(ShowStatementFilterPosition::Suffix(filter)) => {
10006 ("".to_string(), ::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" {0}", filter))
})format!(" {filter}"))
10007 }
10008 None => ("".to_string(), "".to_string()),
10009 };
10010 f.write_fmt(format_args!("{4}{0}{1}{2}{3}{5}",
match &self.show_in {
Some(i) =>
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" {0}", i))
}),
None => String::new(),
},
match &self.starts_with {
Some(s) =>
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" STARTS WITH {0}", s))
}),
None => String::new(),
},
match &self.limit {
Some(l) =>
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" LIMIT {0}", l))
}),
None => String::new(),
},
match &self.limit_from {
Some(f) =>
::alloc::__export::must_use({
::alloc::fmt::format(format_args!(" FROM {0}", f))
}),
None => String::new(),
}, like_in_infix, like_in_suffix))write!(
10011 f,
10012 "{like_in_infix}{show_in}{starts_with}{limit}{from}{like_in_suffix}",
10013 show_in = match &self.show_in {
10014 Some(i) => format!(" {i}"),
10015 None => String::new(),
10016 },
10017 starts_with = match &self.starts_with {
10018 Some(s) => format!(" STARTS WITH {s}"),
10019 None => String::new(),
10020 },
10021 limit = match &self.limit {
10022 Some(l) => format!(" LIMIT {l}"),
10023 None => String::new(),
10024 },
10025 from = match &self.limit_from {
10026 Some(f) => format!(" FROM {f}"),
10027 None => String::new(),
10028 }
10029 )?;
10030 Ok(())
10031 }
10032}
10033
10034#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowStatementFilterPosition {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ShowStatementFilterPosition::Infix(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Infix",
&__self_0),
ShowStatementFilterPosition::Suffix(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Suffix",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowStatementFilterPosition {
#[inline]
fn clone(&self) -> ShowStatementFilterPosition {
match self {
ShowStatementFilterPosition::Infix(__self_0) =>
ShowStatementFilterPosition::Infix(::core::clone::Clone::clone(__self_0)),
ShowStatementFilterPosition::Suffix(__self_0) =>
ShowStatementFilterPosition::Suffix(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowStatementFilterPosition {
#[inline]
fn eq(&self, other: &ShowStatementFilterPosition) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(ShowStatementFilterPosition::Infix(__self_0),
ShowStatementFilterPosition::Infix(__arg1_0)) =>
__self_0 == __arg1_0,
(ShowStatementFilterPosition::Suffix(__self_0),
ShowStatementFilterPosition::Suffix(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowStatementFilterPosition {
#[inline]
fn partial_cmp(&self, other: &ShowStatementFilterPosition)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(ShowStatementFilterPosition::Infix(__self_0),
ShowStatementFilterPosition::Infix(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(ShowStatementFilterPosition::Suffix(__self_0),
ShowStatementFilterPosition::Suffix(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowStatementFilterPosition {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ShowStatementFilter>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowStatementFilterPosition {
#[inline]
fn cmp(&self, other: &ShowStatementFilterPosition)
-> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(ShowStatementFilterPosition::Infix(__self_0),
ShowStatementFilterPosition::Infix(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(ShowStatementFilterPosition::Suffix(__self_0),
ShowStatementFilterPosition::Suffix(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowStatementFilterPosition {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
ShowStatementFilterPosition::Infix(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
ShowStatementFilterPosition::Suffix(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
10035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10036#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowStatementFilterPosition {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Infix(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
Self::Suffix(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowStatementFilterPosition {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Infix(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Suffix(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10037pub enum ShowStatementFilterPosition {
10038 Infix(ShowStatementFilter), Suffix(ShowStatementFilter), }
10041
10042#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowStatementInParentType {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
ShowStatementInParentType::Account => "Account",
ShowStatementInParentType::Database => "Database",
ShowStatementInParentType::Schema => "Schema",
ShowStatementInParentType::Table => "Table",
ShowStatementInParentType::View => "View",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowStatementInParentType {
#[inline]
fn clone(&self) -> ShowStatementInParentType {
match self {
ShowStatementInParentType::Account =>
ShowStatementInParentType::Account,
ShowStatementInParentType::Database =>
ShowStatementInParentType::Database,
ShowStatementInParentType::Schema =>
ShowStatementInParentType::Schema,
ShowStatementInParentType::Table =>
ShowStatementInParentType::Table,
ShowStatementInParentType::View =>
ShowStatementInParentType::View,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowStatementInParentType {
#[inline]
fn eq(&self, other: &ShowStatementInParentType) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowStatementInParentType {
#[inline]
fn partial_cmp(&self, other: &ShowStatementInParentType)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowStatementInParentType {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowStatementInParentType {
#[inline]
fn cmp(&self, other: &ShowStatementInParentType)
-> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowStatementInParentType {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10044#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowStatementInParentType {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Account => {}
Self::Database => {}
Self::Schema => {}
Self::Table => {}
Self::View => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowStatementInParentType {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Account => {}
Self::Database => {}
Self::Schema => {}
Self::Table => {}
Self::View => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10045pub enum ShowStatementInParentType {
10046 Account,
10047 Database,
10048 Schema,
10049 Table,
10050 View,
10051}
10052
10053impl fmt::Display for ShowStatementInParentType {
10054 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10055 match self {
10056 ShowStatementInParentType::Account => f.write_fmt(format_args!("ACCOUNT"))write!(f, "ACCOUNT"),
10057 ShowStatementInParentType::Database => f.write_fmt(format_args!("DATABASE"))write!(f, "DATABASE"),
10058 ShowStatementInParentType::Schema => f.write_fmt(format_args!("SCHEMA"))write!(f, "SCHEMA"),
10059 ShowStatementInParentType::Table => f.write_fmt(format_args!("TABLE"))write!(f, "TABLE"),
10060 ShowStatementInParentType::View => f.write_fmt(format_args!("VIEW"))write!(f, "VIEW"),
10061 }
10062 }
10063}
10064
10065#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowStatementIn {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"ShowStatementIn", "clause", &self.clause, "parent_type",
&self.parent_type, "parent_name", &&self.parent_name)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowStatementIn {
#[inline]
fn clone(&self) -> ShowStatementIn {
ShowStatementIn {
clause: ::core::clone::Clone::clone(&self.clause),
parent_type: ::core::clone::Clone::clone(&self.parent_type),
parent_name: ::core::clone::Clone::clone(&self.parent_name),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowStatementIn {
#[inline]
fn eq(&self, other: &ShowStatementIn) -> bool {
self.clause == other.clause && self.parent_type == other.parent_type
&& self.parent_name == other.parent_name
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowStatementIn {
#[inline]
fn partial_cmp(&self, other: &ShowStatementIn)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.clause,
&other.clause) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.parent_type,
&other.parent_type) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.parent_name,
&other.parent_name),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowStatementIn {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ShowStatementInClause>;
let _:
::core::cmp::AssertParamIsEq<Option<ShowStatementInParentType>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowStatementIn {
#[inline]
fn cmp(&self, other: &ShowStatementIn) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.clause, &other.clause) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.parent_type,
&other.parent_type) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.parent_name,
&other.parent_name),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowStatementIn {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.clause, state);
::core::hash::Hash::hash(&self.parent_type, state);
::core::hash::Hash::hash(&self.parent_name, state)
}
}Hash)]
10066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10067#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowStatementIn {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.clause, visitor)?;
sqlparser::ast::Visit::visit(&self.parent_type, visitor)?;
if let Some(value) = &self.parent_name {
visitor.pre_visit_relation(value)?;
sqlparser::ast::Visit::visit(value, visitor)?;
visitor.post_visit_relation(value)?;
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowStatementIn {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.clause, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.parent_type, visitor)?;
if let Some(value) = &mut self.parent_name {
visitor.pre_visit_relation(value)?;
sqlparser::ast::VisitMut::visit(value, visitor)?;
visitor.post_visit_relation(value)?;
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10068pub struct ShowStatementIn {
10069 pub clause: ShowStatementInClause,
10070 pub parent_type: Option<ShowStatementInParentType>,
10071 #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
10072 pub parent_name: Option<ObjectName>,
10073}
10074
10075impl fmt::Display for ShowStatementIn {
10076 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10077 f.write_fmt(format_args!("{0}", self.clause))write!(f, "{}", self.clause)?;
10078 if let Some(parent_type) = &self.parent_type {
10079 f.write_fmt(format_args!(" {0}", parent_type))write!(f, " {parent_type}")?;
10080 }
10081 if let Some(parent_name) = &self.parent_name {
10082 f.write_fmt(format_args!(" {0}", parent_name))write!(f, " {parent_name}")?;
10083 }
10084 Ok(())
10085 }
10086}
10087
10088#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowCharset {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "ShowCharset",
"is_shorthand", &self.is_shorthand, "filter", &&self.filter)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowCharset {
#[inline]
fn clone(&self) -> ShowCharset {
ShowCharset {
is_shorthand: ::core::clone::Clone::clone(&self.is_shorthand),
filter: ::core::clone::Clone::clone(&self.filter),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowCharset {
#[inline]
fn eq(&self, other: &ShowCharset) -> bool {
self.is_shorthand == other.is_shorthand && self.filter == other.filter
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowCharset {
#[inline]
fn partial_cmp(&self, other: &ShowCharset)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.is_shorthand,
&other.is_shorthand) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.filter,
&other.filter),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowCharset {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Option<ShowStatementFilter>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowCharset {
#[inline]
fn cmp(&self, other: &ShowCharset) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.is_shorthand, &other.is_shorthand) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.filter, &other.filter),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowCharset {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.is_shorthand, state);
::core::hash::Hash::hash(&self.filter, state)
}
}Hash)]
10090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10091#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowCharset {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.is_shorthand, visitor)?;
sqlparser::ast::Visit::visit(&self.filter, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowCharset {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.is_shorthand, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.filter, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10092pub struct ShowCharset {
10093 pub is_shorthand: bool,
10096 pub filter: Option<ShowStatementFilter>,
10097}
10098
10099impl fmt::Display for ShowCharset {
10100 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10101 f.write_fmt(format_args!("SHOW"))write!(f, "SHOW")?;
10102 if self.is_shorthand {
10103 f.write_fmt(format_args!(" CHARSET"))write!(f, " CHARSET")?;
10104 } else {
10105 f.write_fmt(format_args!(" CHARACTER SET"))write!(f, " CHARACTER SET")?;
10106 }
10107 if self.filter.is_some() {
10108 f.write_fmt(format_args!(" {0}", self.filter.as_ref().unwrap()))write!(f, " {}", self.filter.as_ref().unwrap())?;
10109 }
10110 Ok(())
10111 }
10112}
10113
10114#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ShowObjects {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "ShowObjects",
"terse", &self.terse, "show_options", &&self.show_options)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ShowObjects {
#[inline]
fn clone(&self) -> ShowObjects {
ShowObjects {
terse: ::core::clone::Clone::clone(&self.terse),
show_options: ::core::clone::Clone::clone(&self.show_options),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ShowObjects {
#[inline]
fn eq(&self, other: &ShowObjects) -> bool {
self.terse == other.terse && self.show_options == other.show_options
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ShowObjects {
#[inline]
fn partial_cmp(&self, other: &ShowObjects)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.terse, &other.terse)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.show_options,
&other.show_options),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ShowObjects {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<ShowStatementOptions>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ShowObjects {
#[inline]
fn cmp(&self, other: &ShowObjects) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.terse, &other.terse) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.show_options,
&other.show_options),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ShowObjects {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.terse, state);
::core::hash::Hash::hash(&self.show_options, state)
}
}Hash)]
10115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10116#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ShowObjects {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.terse, visitor)?;
sqlparser::ast::Visit::visit(&self.show_options, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ShowObjects {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.terse, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.show_options, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10117pub struct ShowObjects {
10118 pub terse: bool,
10119 pub show_options: ShowStatementOptions,
10120}
10121
10122#[derive(#[automatically_derived]
impl ::core::fmt::Debug for JsonNullClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
JsonNullClause::NullOnNull => "NullOnNull",
JsonNullClause::AbsentOnNull => "AbsentOnNull",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for JsonNullClause {
#[inline]
fn clone(&self) -> JsonNullClause {
match self {
JsonNullClause::NullOnNull => JsonNullClause::NullOnNull,
JsonNullClause::AbsentOnNull => JsonNullClause::AbsentOnNull,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for JsonNullClause {
#[inline]
fn eq(&self, other: &JsonNullClause) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for JsonNullClause {
#[inline]
fn partial_cmp(&self, other: &JsonNullClause)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for JsonNullClause {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for JsonNullClause {
#[inline]
fn cmp(&self, other: &JsonNullClause) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for JsonNullClause {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10133#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for JsonNullClause {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::NullOnNull => {} Self::AbsentOnNull => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for JsonNullClause {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::NullOnNull => {} Self::AbsentOnNull => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10134pub enum JsonNullClause {
10135 NullOnNull,
10136 AbsentOnNull,
10137}
10138
10139impl Display for JsonNullClause {
10140 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10141 match self {
10142 JsonNullClause::NullOnNull => f.write_fmt(format_args!("NULL ON NULL"))write!(f, "NULL ON NULL"),
10143 JsonNullClause::AbsentOnNull => f.write_fmt(format_args!("ABSENT ON NULL"))write!(f, "ABSENT ON NULL"),
10144 }
10145 }
10146}
10147
10148#[derive(#[automatically_derived]
impl ::core::fmt::Debug for JsonReturningClause {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"JsonReturningClause", "data_type", &&self.data_type)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for JsonReturningClause {
#[inline]
fn clone(&self) -> JsonReturningClause {
JsonReturningClause {
data_type: ::core::clone::Clone::clone(&self.data_type),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for JsonReturningClause {
#[inline]
fn eq(&self, other: &JsonReturningClause) -> bool {
self.data_type == other.data_type
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for JsonReturningClause {
#[inline]
fn partial_cmp(&self, other: &JsonReturningClause)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.data_type,
&other.data_type)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for JsonReturningClause {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<DataType>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for JsonReturningClause {
#[inline]
fn cmp(&self, other: &JsonReturningClause) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for JsonReturningClause {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.data_type, state)
}
}Hash)]
10155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10156#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for JsonReturningClause {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for JsonReturningClause {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.data_type, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10157pub struct JsonReturningClause {
10158 pub data_type: DataType,
10159}
10160
10161impl Display for JsonReturningClause {
10162 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10163 f.write_fmt(format_args!("RETURNING {0}", self.data_type))write!(f, "RETURNING {}", self.data_type)
10164 }
10165}
10166
10167#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RenameTable {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "RenameTable",
"old_name", &self.old_name, "new_name", &&self.new_name)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RenameTable {
#[inline]
fn clone(&self) -> RenameTable {
RenameTable {
old_name: ::core::clone::Clone::clone(&self.old_name),
new_name: ::core::clone::Clone::clone(&self.new_name),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RenameTable {
#[inline]
fn eq(&self, other: &RenameTable) -> bool {
self.old_name == other.old_name && self.new_name == other.new_name
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RenameTable {
#[inline]
fn partial_cmp(&self, other: &RenameTable)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.old_name,
&other.old_name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.new_name,
&other.new_name),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RenameTable {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RenameTable {
#[inline]
fn cmp(&self, other: &RenameTable) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.old_name, &other.old_name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.new_name, &other.new_name),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RenameTable {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.old_name, state);
::core::hash::Hash::hash(&self.new_name, state)
}
}Hash)]
10169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10170#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RenameTable {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.old_name, visitor)?;
sqlparser::ast::Visit::visit(&self.new_name, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for RenameTable {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.old_name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.new_name, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10171pub struct RenameTable {
10172 pub old_name: ObjectName,
10173 pub new_name: ObjectName,
10174}
10175
10176impl fmt::Display for RenameTable {
10177 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10178 f.write_fmt(format_args!("{0} TO {1}", self.old_name, self.new_name))write!(f, "{} TO {}", self.old_name, self.new_name)?;
10179 Ok(())
10180 }
10181}
10182
10183#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TableObject {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
TableObject::TableName(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"TableName", &__self_0),
TableObject::TableFunction(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"TableFunction", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TableObject {
#[inline]
fn clone(&self) -> TableObject {
match self {
TableObject::TableName(__self_0) =>
TableObject::TableName(::core::clone::Clone::clone(__self_0)),
TableObject::TableFunction(__self_0) =>
TableObject::TableFunction(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TableObject {
#[inline]
fn eq(&self, other: &TableObject) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(TableObject::TableName(__self_0),
TableObject::TableName(__arg1_0)) => __self_0 == __arg1_0,
(TableObject::TableFunction(__self_0),
TableObject::TableFunction(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TableObject {
#[inline]
fn partial_cmp(&self, other: &TableObject)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(TableObject::TableName(__self_0),
TableObject::TableName(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(TableObject::TableFunction(__self_0),
TableObject::TableFunction(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TableObject {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Function>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TableObject {
#[inline]
fn cmp(&self, other: &TableObject) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(TableObject::TableName(__self_0),
TableObject::TableName(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(TableObject::TableFunction(__self_0),
TableObject::TableFunction(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TableObject {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
TableObject::TableName(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
TableObject::TableFunction(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
10185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10186#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TableObject {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::TableName(_0) => {
visitor.pre_visit_relation(_0)?;
sqlparser::ast::Visit::visit(_0, visitor)?;
visitor.post_visit_relation(_0)?;
}
Self::TableFunction(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for TableObject {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::TableName(_0) => {
visitor.pre_visit_relation(_0)?;
sqlparser::ast::VisitMut::visit(_0, visitor)?;
visitor.post_visit_relation(_0)?;
}
Self::TableFunction(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10187pub enum TableObject {
10188 TableName(#[cfg_attr(feature = "visitor", visit(with = "visit_relation"))] ObjectName),
10194
10195 TableFunction(Function),
10202}
10203
10204impl fmt::Display for TableObject {
10205 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10206 match self {
10207 Self::TableName(table_name) => f.write_fmt(format_args!("{0}", table_name))write!(f, "{table_name}"),
10208 Self::TableFunction(func) => f.write_fmt(format_args!("FUNCTION {0}", func))write!(f, "FUNCTION {func}"),
10209 }
10210 }
10211}
10212
10213#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SetSessionParamKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
SetSessionParamKind::Generic(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Generic", &__self_0),
SetSessionParamKind::IdentityInsert(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"IdentityInsert", &__self_0),
SetSessionParamKind::Offsets(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Offsets", &__self_0),
SetSessionParamKind::Statistics(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Statistics", &__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SetSessionParamKind {
#[inline]
fn clone(&self) -> SetSessionParamKind {
match self {
SetSessionParamKind::Generic(__self_0) =>
SetSessionParamKind::Generic(::core::clone::Clone::clone(__self_0)),
SetSessionParamKind::IdentityInsert(__self_0) =>
SetSessionParamKind::IdentityInsert(::core::clone::Clone::clone(__self_0)),
SetSessionParamKind::Offsets(__self_0) =>
SetSessionParamKind::Offsets(::core::clone::Clone::clone(__self_0)),
SetSessionParamKind::Statistics(__self_0) =>
SetSessionParamKind::Statistics(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SetSessionParamKind {
#[inline]
fn eq(&self, other: &SetSessionParamKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(SetSessionParamKind::Generic(__self_0),
SetSessionParamKind::Generic(__arg1_0)) =>
__self_0 == __arg1_0,
(SetSessionParamKind::IdentityInsert(__self_0),
SetSessionParamKind::IdentityInsert(__arg1_0)) =>
__self_0 == __arg1_0,
(SetSessionParamKind::Offsets(__self_0),
SetSessionParamKind::Offsets(__arg1_0)) =>
__self_0 == __arg1_0,
(SetSessionParamKind::Statistics(__self_0),
SetSessionParamKind::Statistics(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SetSessionParamKind {
#[inline]
fn partial_cmp(&self, other: &SetSessionParamKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(SetSessionParamKind::Generic(__self_0),
SetSessionParamKind::Generic(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SetSessionParamKind::IdentityInsert(__self_0),
SetSessionParamKind::IdentityInsert(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SetSessionParamKind::Offsets(__self_0),
SetSessionParamKind::Offsets(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(SetSessionParamKind::Statistics(__self_0),
SetSessionParamKind::Statistics(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SetSessionParamKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<SetSessionParamGeneric>;
let _: ::core::cmp::AssertParamIsEq<SetSessionParamIdentityInsert>;
let _: ::core::cmp::AssertParamIsEq<SetSessionParamOffsets>;
let _: ::core::cmp::AssertParamIsEq<SetSessionParamStatistics>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SetSessionParamKind {
#[inline]
fn cmp(&self, other: &SetSessionParamKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(SetSessionParamKind::Generic(__self_0),
SetSessionParamKind::Generic(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SetSessionParamKind::IdentityInsert(__self_0),
SetSessionParamKind::IdentityInsert(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SetSessionParamKind::Offsets(__self_0),
SetSessionParamKind::Offsets(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(SetSessionParamKind::Statistics(__self_0),
SetSessionParamKind::Statistics(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SetSessionParamKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
SetSessionParamKind::Generic(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SetSessionParamKind::IdentityInsert(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SetSessionParamKind::Offsets(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
SetSessionParamKind::Statistics(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
10214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10215#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SetSessionParamKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Generic(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::IdentityInsert(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Offsets(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Statistics(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SetSessionParamKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Generic(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::IdentityInsert(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Offsets(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Statistics(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10216pub enum SetSessionParamKind {
10217 Generic(SetSessionParamGeneric),
10218 IdentityInsert(SetSessionParamIdentityInsert),
10219 Offsets(SetSessionParamOffsets),
10220 Statistics(SetSessionParamStatistics),
10221}
10222
10223impl fmt::Display for SetSessionParamKind {
10224 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10225 match self {
10226 SetSessionParamKind::Generic(x) => f.write_fmt(format_args!("{0}", x))write!(f, "{x}"),
10227 SetSessionParamKind::IdentityInsert(x) => f.write_fmt(format_args!("{0}", x))write!(f, "{x}"),
10228 SetSessionParamKind::Offsets(x) => f.write_fmt(format_args!("{0}", x))write!(f, "{x}"),
10229 SetSessionParamKind::Statistics(x) => f.write_fmt(format_args!("{0}", x))write!(f, "{x}"),
10230 }
10231 }
10232}
10233
10234#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SetSessionParamGeneric {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetSessionParamGeneric", "names", &self.names, "value",
&&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SetSessionParamGeneric {
#[inline]
fn clone(&self) -> SetSessionParamGeneric {
SetSessionParamGeneric {
names: ::core::clone::Clone::clone(&self.names),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SetSessionParamGeneric {
#[inline]
fn eq(&self, other: &SetSessionParamGeneric) -> bool {
self.names == other.names && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SetSessionParamGeneric {
#[inline]
fn partial_cmp(&self, other: &SetSessionParamGeneric)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.names, &other.names)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SetSessionParamGeneric {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<String>>;
let _: ::core::cmp::AssertParamIsEq<String>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SetSessionParamGeneric {
#[inline]
fn cmp(&self, other: &SetSessionParamGeneric) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.names, &other.names) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SetSessionParamGeneric {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.names, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
10235#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10236#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SetSessionParamGeneric {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.names, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SetSessionParamGeneric {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.names, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10237pub struct SetSessionParamGeneric {
10238 pub names: Vec<String>,
10239 pub value: String,
10240}
10241
10242impl fmt::Display for SetSessionParamGeneric {
10243 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10244 f.write_fmt(format_args!("{0} {1}", display_comma_separated(&self.names),
self.value))write!(f, "{} {}", display_comma_separated(&self.names), self.value)
10245 }
10246}
10247
10248#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SetSessionParamIdentityInsert {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetSessionParamIdentityInsert", "obj", &self.obj, "value",
&&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SetSessionParamIdentityInsert {
#[inline]
fn clone(&self) -> SetSessionParamIdentityInsert {
SetSessionParamIdentityInsert {
obj: ::core::clone::Clone::clone(&self.obj),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SetSessionParamIdentityInsert {
#[inline]
fn eq(&self, other: &SetSessionParamIdentityInsert) -> bool {
self.obj == other.obj && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SetSessionParamIdentityInsert {
#[inline]
fn partial_cmp(&self, other: &SetSessionParamIdentityInsert)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.obj, &other.obj) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SetSessionParamIdentityInsert {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<SessionParamValue>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SetSessionParamIdentityInsert {
#[inline]
fn cmp(&self, other: &SetSessionParamIdentityInsert)
-> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.obj, &other.obj) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SetSessionParamIdentityInsert {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.obj, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
10249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10250#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SetSessionParamIdentityInsert {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.obj, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SetSessionParamIdentityInsert {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.obj, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10251pub struct SetSessionParamIdentityInsert {
10252 pub obj: ObjectName,
10253 pub value: SessionParamValue,
10254}
10255
10256impl fmt::Display for SetSessionParamIdentityInsert {
10257 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10258 f.write_fmt(format_args!("IDENTITY_INSERT {0} {1}", self.obj, self.value))write!(f, "IDENTITY_INSERT {} {}", self.obj, self.value)
10259 }
10260}
10261
10262#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SetSessionParamOffsets {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetSessionParamOffsets", "keywords", &self.keywords, "value",
&&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SetSessionParamOffsets {
#[inline]
fn clone(&self) -> SetSessionParamOffsets {
SetSessionParamOffsets {
keywords: ::core::clone::Clone::clone(&self.keywords),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SetSessionParamOffsets {
#[inline]
fn eq(&self, other: &SetSessionParamOffsets) -> bool {
self.keywords == other.keywords && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SetSessionParamOffsets {
#[inline]
fn partial_cmp(&self, other: &SetSessionParamOffsets)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.keywords,
&other.keywords) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SetSessionParamOffsets {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<String>>;
let _: ::core::cmp::AssertParamIsEq<SessionParamValue>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SetSessionParamOffsets {
#[inline]
fn cmp(&self, other: &SetSessionParamOffsets) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.keywords, &other.keywords) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SetSessionParamOffsets {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.keywords, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
10263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10264#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SetSessionParamOffsets {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.keywords, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SetSessionParamOffsets {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.keywords, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10265pub struct SetSessionParamOffsets {
10266 pub keywords: Vec<String>,
10267 pub value: SessionParamValue,
10268}
10269
10270impl fmt::Display for SetSessionParamOffsets {
10271 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10272 f.write_fmt(format_args!("OFFSETS {0} {1}",
display_comma_separated(&self.keywords), self.value))write!(
10273 f,
10274 "OFFSETS {} {}",
10275 display_comma_separated(&self.keywords),
10276 self.value
10277 )
10278 }
10279}
10280
10281#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SetSessionParamStatistics {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"SetSessionParamStatistics", "topic", &self.topic, "value",
&&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SetSessionParamStatistics {
#[inline]
fn clone(&self) -> SetSessionParamStatistics {
SetSessionParamStatistics {
topic: ::core::clone::Clone::clone(&self.topic),
value: ::core::clone::Clone::clone(&self.value),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SetSessionParamStatistics {
#[inline]
fn eq(&self, other: &SetSessionParamStatistics) -> bool {
self.topic == other.topic && self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SetSessionParamStatistics {
#[inline]
fn partial_cmp(&self, other: &SetSessionParamStatistics)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.topic, &other.topic)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.value,
&other.value),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SetSessionParamStatistics {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<SessionParamStatsTopic>;
let _: ::core::cmp::AssertParamIsEq<SessionParamValue>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SetSessionParamStatistics {
#[inline]
fn cmp(&self, other: &SetSessionParamStatistics)
-> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.topic, &other.topic) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.value, &other.value),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SetSessionParamStatistics {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.topic, state);
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
10282#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10283#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SetSessionParamStatistics {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.topic, visitor)?;
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SetSessionParamStatistics {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.topic, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10284pub struct SetSessionParamStatistics {
10285 pub topic: SessionParamStatsTopic,
10286 pub value: SessionParamValue,
10287}
10288
10289impl fmt::Display for SetSessionParamStatistics {
10290 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10291 f.write_fmt(format_args!("STATISTICS {0} {1}", self.topic, self.value))write!(f, "STATISTICS {} {}", self.topic, self.value)
10292 }
10293}
10294
10295#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SessionParamStatsTopic {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
SessionParamStatsTopic::IO => "IO",
SessionParamStatsTopic::Profile => "Profile",
SessionParamStatsTopic::Time => "Time",
SessionParamStatsTopic::Xml => "Xml",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SessionParamStatsTopic {
#[inline]
fn clone(&self) -> SessionParamStatsTopic {
match self {
SessionParamStatsTopic::IO => SessionParamStatsTopic::IO,
SessionParamStatsTopic::Profile =>
SessionParamStatsTopic::Profile,
SessionParamStatsTopic::Time => SessionParamStatsTopic::Time,
SessionParamStatsTopic::Xml => SessionParamStatsTopic::Xml,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SessionParamStatsTopic {
#[inline]
fn eq(&self, other: &SessionParamStatsTopic) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SessionParamStatsTopic {
#[inline]
fn partial_cmp(&self, other: &SessionParamStatsTopic)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SessionParamStatsTopic {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SessionParamStatsTopic {
#[inline]
fn cmp(&self, other: &SessionParamStatsTopic) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SessionParamStatsTopic {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10297#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SessionParamStatsTopic {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IO => {}
Self::Profile => {}
Self::Time => {}
Self::Xml => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SessionParamStatsTopic {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::IO => {}
Self::Profile => {}
Self::Time => {}
Self::Xml => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10298pub enum SessionParamStatsTopic {
10299 IO,
10300 Profile,
10301 Time,
10302 Xml,
10303}
10304
10305impl fmt::Display for SessionParamStatsTopic {
10306 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10307 match self {
10308 SessionParamStatsTopic::IO => f.write_fmt(format_args!("IO"))write!(f, "IO"),
10309 SessionParamStatsTopic::Profile => f.write_fmt(format_args!("PROFILE"))write!(f, "PROFILE"),
10310 SessionParamStatsTopic::Time => f.write_fmt(format_args!("TIME"))write!(f, "TIME"),
10311 SessionParamStatsTopic::Xml => f.write_fmt(format_args!("XML"))write!(f, "XML"),
10312 }
10313 }
10314}
10315
10316#[derive(#[automatically_derived]
impl ::core::fmt::Debug for SessionParamValue {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
SessionParamValue::On => "On",
SessionParamValue::Off => "Off",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for SessionParamValue {
#[inline]
fn clone(&self) -> SessionParamValue {
match self {
SessionParamValue::On => SessionParamValue::On,
SessionParamValue::Off => SessionParamValue::Off,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for SessionParamValue {
#[inline]
fn eq(&self, other: &SessionParamValue) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for SessionParamValue {
#[inline]
fn partial_cmp(&self, other: &SessionParamValue)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for SessionParamValue {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for SessionParamValue {
#[inline]
fn cmp(&self, other: &SessionParamValue) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for SessionParamValue {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10317#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10318#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for SessionParamValue {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::On => {} Self::Off => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for SessionParamValue {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::On => {} Self::Off => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10319pub enum SessionParamValue {
10320 On,
10321 Off,
10322}
10323
10324impl fmt::Display for SessionParamValue {
10325 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10326 match self {
10327 SessionParamValue::On => f.write_fmt(format_args!("ON"))write!(f, "ON"),
10328 SessionParamValue::Off => f.write_fmt(format_args!("OFF"))write!(f, "OFF"),
10329 }
10330 }
10331}
10332
10333#[derive(#[automatically_derived]
impl ::core::fmt::Debug for StorageSerializationPolicy {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
StorageSerializationPolicy::Compatible => "Compatible",
StorageSerializationPolicy::Optimized => "Optimized",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for StorageSerializationPolicy { }Copy, #[automatically_derived]
impl ::core::clone::Clone for StorageSerializationPolicy {
#[inline]
fn clone(&self) -> StorageSerializationPolicy { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for StorageSerializationPolicy {
#[inline]
fn eq(&self, other: &StorageSerializationPolicy) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for StorageSerializationPolicy {
#[inline]
fn partial_cmp(&self, other: &StorageSerializationPolicy)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for StorageSerializationPolicy {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for StorageSerializationPolicy {
#[inline]
fn cmp(&self, other: &StorageSerializationPolicy)
-> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for StorageSerializationPolicy {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10341#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for StorageSerializationPolicy {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Compatible => {} Self::Optimized => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for StorageSerializationPolicy {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Compatible => {} Self::Optimized => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10342pub enum StorageSerializationPolicy {
10343 Compatible,
10344 Optimized,
10345}
10346
10347impl Display for StorageSerializationPolicy {
10348 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10349 match self {
10350 StorageSerializationPolicy::Compatible => f.write_fmt(format_args!("COMPATIBLE"))write!(f, "COMPATIBLE"),
10351 StorageSerializationPolicy::Optimized => f.write_fmt(format_args!("OPTIMIZED"))write!(f, "OPTIMIZED"),
10352 }
10353 }
10354}
10355
10356#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CatalogSyncNamespaceMode {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CatalogSyncNamespaceMode::Nest => "Nest",
CatalogSyncNamespaceMode::Flatten => "Flatten",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for CatalogSyncNamespaceMode { }Copy, #[automatically_derived]
impl ::core::clone::Clone for CatalogSyncNamespaceMode {
#[inline]
fn clone(&self) -> CatalogSyncNamespaceMode { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CatalogSyncNamespaceMode {
#[inline]
fn eq(&self, other: &CatalogSyncNamespaceMode) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CatalogSyncNamespaceMode {
#[inline]
fn partial_cmp(&self, other: &CatalogSyncNamespaceMode)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CatalogSyncNamespaceMode {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CatalogSyncNamespaceMode {
#[inline]
fn cmp(&self, other: &CatalogSyncNamespaceMode) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CatalogSyncNamespaceMode {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10363#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10364#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CatalogSyncNamespaceMode {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Nest => {} Self::Flatten => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CatalogSyncNamespaceMode {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Nest => {} Self::Flatten => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10365pub enum CatalogSyncNamespaceMode {
10366 Nest,
10367 Flatten,
10368}
10369
10370impl Display for CatalogSyncNamespaceMode {
10371 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10372 match self {
10373 CatalogSyncNamespaceMode::Nest => f.write_fmt(format_args!("NEST"))write!(f, "NEST"),
10374 CatalogSyncNamespaceMode::Flatten => f.write_fmt(format_args!("FLATTEN"))write!(f, "FLATTEN"),
10375 }
10376 }
10377}
10378
10379#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CopyIntoSnowflakeKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CopyIntoSnowflakeKind::Table => "Table",
CopyIntoSnowflakeKind::Location => "Location",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for CopyIntoSnowflakeKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for CopyIntoSnowflakeKind {
#[inline]
fn clone(&self) -> CopyIntoSnowflakeKind { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CopyIntoSnowflakeKind {
#[inline]
fn eq(&self, other: &CopyIntoSnowflakeKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CopyIntoSnowflakeKind {
#[inline]
fn partial_cmp(&self, other: &CopyIntoSnowflakeKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CopyIntoSnowflakeKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CopyIntoSnowflakeKind {
#[inline]
fn cmp(&self, other: &CopyIntoSnowflakeKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CopyIntoSnowflakeKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10382#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CopyIntoSnowflakeKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Table => {} Self::Location => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CopyIntoSnowflakeKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Table => {} Self::Location => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10383pub enum CopyIntoSnowflakeKind {
10384 Table,
10387 Location,
10390}
10391
10392#[derive(#[automatically_derived]
impl ::core::fmt::Debug for PrintStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"PrintStatement", "message", &&self.message)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for PrintStatement {
#[inline]
fn clone(&self) -> PrintStatement {
PrintStatement { message: ::core::clone::Clone::clone(&self.message) }
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for PrintStatement {
#[inline]
fn eq(&self, other: &PrintStatement) -> bool {
self.message == other.message
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for PrintStatement {
#[inline]
fn partial_cmp(&self, other: &PrintStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.message, &other.message)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for PrintStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for PrintStatement {
#[inline]
fn cmp(&self, other: &PrintStatement) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.message, &other.message)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for PrintStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.message, state)
}
}Hash)]
10393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10394#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for PrintStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.message, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for PrintStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.message, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10395pub struct PrintStatement {
10396 pub message: Box<Expr>,
10397}
10398
10399impl fmt::Display for PrintStatement {
10400 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10401 f.write_fmt(format_args!("PRINT {0}", self.message))write!(f, "PRINT {}", self.message)
10402 }
10403}
10404
10405#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ReturnStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f,
"ReturnStatement", "value", &&self.value)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ReturnStatement {
#[inline]
fn clone(&self) -> ReturnStatement {
ReturnStatement { value: ::core::clone::Clone::clone(&self.value) }
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ReturnStatement {
#[inline]
fn eq(&self, other: &ReturnStatement) -> bool {
self.value == other.value
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ReturnStatement {
#[inline]
fn partial_cmp(&self, other: &ReturnStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.value, &other.value)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ReturnStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Option<ReturnStatementValue>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ReturnStatement {
#[inline]
fn cmp(&self, other: &ReturnStatement) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.value, &other.value)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ReturnStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.value, state)
}
}Hash)]
10410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10411#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ReturnStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ReturnStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10412pub struct ReturnStatement {
10413 pub value: Option<ReturnStatementValue>,
10414}
10415
10416impl fmt::Display for ReturnStatement {
10417 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10418 match &self.value {
10419 Some(ReturnStatementValue::Expr(expr)) => f.write_fmt(format_args!("RETURN {0}", expr))write!(f, "RETURN {expr}"),
10420 None => f.write_fmt(format_args!("RETURN"))write!(f, "RETURN"),
10421 }
10422 }
10423}
10424
10425#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ReturnStatementValue {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
ReturnStatementValue::Expr(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ReturnStatementValue {
#[inline]
fn clone(&self) -> ReturnStatementValue {
match self {
ReturnStatementValue::Expr(__self_0) =>
ReturnStatementValue::Expr(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ReturnStatementValue {
#[inline]
fn eq(&self, other: &ReturnStatementValue) -> bool {
match (self, other) {
(ReturnStatementValue::Expr(__self_0),
ReturnStatementValue::Expr(__arg1_0)) => __self_0 == __arg1_0,
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ReturnStatementValue {
#[inline]
fn partial_cmp(&self, other: &ReturnStatementValue)
-> ::core::option::Option<::core::cmp::Ordering> {
match (self, other) {
(ReturnStatementValue::Expr(__self_0),
ReturnStatementValue::Expr(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ReturnStatementValue {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Expr>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ReturnStatementValue {
#[inline]
fn cmp(&self, other: &ReturnStatementValue) -> ::core::cmp::Ordering {
match (self, other) {
(ReturnStatementValue::Expr(__self_0),
ReturnStatementValue::Expr(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ReturnStatementValue {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
match self {
ReturnStatementValue::Expr(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
10427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10428#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ReturnStatementValue {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ReturnStatementValue {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Expr(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10429pub enum ReturnStatementValue {
10430 Expr(Expr),
10431}
10432
10433#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OpenStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field1_finish(f, "OpenStatement",
"cursor_name", &&self.cursor_name)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OpenStatement {
#[inline]
fn clone(&self) -> OpenStatement {
OpenStatement {
cursor_name: ::core::clone::Clone::clone(&self.cursor_name),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OpenStatement {
#[inline]
fn eq(&self, other: &OpenStatement) -> bool {
self.cursor_name == other.cursor_name
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OpenStatement {
#[inline]
fn partial_cmp(&self, other: &OpenStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
::core::cmp::PartialOrd::partial_cmp(&self.cursor_name,
&other.cursor_name)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OpenStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Ident>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OpenStatement {
#[inline]
fn cmp(&self, other: &OpenStatement) -> ::core::cmp::Ordering {
::core::cmp::Ord::cmp(&self.cursor_name, &other.cursor_name)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OpenStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.cursor_name, state)
}
}Hash)]
10435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10436#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OpenStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.cursor_name, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for OpenStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.cursor_name, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10437pub struct OpenStatement {
10438 pub cursor_name: Ident,
10440}
10441
10442impl fmt::Display for OpenStatement {
10443 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10444 f.write_fmt(format_args!("OPEN {0}", self.cursor_name))write!(f, "OPEN {}", self.cursor_name)
10445 }
10446}
10447
10448#[derive(#[automatically_derived]
impl ::core::fmt::Debug for NullInclusion {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
NullInclusion::IncludeNulls => "IncludeNulls",
NullInclusion::ExcludeNulls => "ExcludeNulls",
})
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for NullInclusion {
#[inline]
fn clone(&self) -> NullInclusion {
match self {
NullInclusion::IncludeNulls => NullInclusion::IncludeNulls,
NullInclusion::ExcludeNulls => NullInclusion::ExcludeNulls,
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for NullInclusion {
#[inline]
fn eq(&self, other: &NullInclusion) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for NullInclusion {
#[inline]
fn partial_cmp(&self, other: &NullInclusion)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for NullInclusion {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for NullInclusion {
#[inline]
fn cmp(&self, other: &NullInclusion) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for NullInclusion {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10453#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for NullInclusion {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::IncludeNulls => {} Self::ExcludeNulls => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for NullInclusion {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::IncludeNulls => {} Self::ExcludeNulls => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10454pub enum NullInclusion {
10455 IncludeNulls,
10456 ExcludeNulls,
10457}
10458
10459impl fmt::Display for NullInclusion {
10460 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10461 match self {
10462 NullInclusion::IncludeNulls => f.write_fmt(format_args!("INCLUDE NULLS"))write!(f, "INCLUDE NULLS"),
10463 NullInclusion::ExcludeNulls => f.write_fmt(format_args!("EXCLUDE NULLS"))write!(f, "EXCLUDE NULLS"),
10464 }
10465 }
10466}
10467
10468#[derive(#[automatically_derived]
impl ::core::fmt::Debug for MemberOf {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f, "MemberOf",
"value", &self.value, "array", &&self.array)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for MemberOf {
#[inline]
fn clone(&self) -> MemberOf {
MemberOf {
value: ::core::clone::Clone::clone(&self.value),
array: ::core::clone::Clone::clone(&self.array),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for MemberOf {
#[inline]
fn eq(&self, other: &MemberOf) -> bool {
self.value == other.value && self.array == other.array
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for MemberOf {
#[inline]
fn partial_cmp(&self, other: &MemberOf)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.value, &other.value)
{
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.array,
&other.array),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for MemberOf {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for MemberOf {
#[inline]
fn cmp(&self, other: &MemberOf) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.value, &other.value) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.array, &other.array),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for MemberOf {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.value, state);
::core::hash::Hash::hash(&self.array, state)
}
}Hash)]
10476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10477#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for MemberOf {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.value, visitor)?;
sqlparser::ast::Visit::visit(&self.array, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for MemberOf {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.array, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10478pub struct MemberOf {
10479 pub value: Box<Expr>,
10480 pub array: Box<Expr>,
10481}
10482
10483impl fmt::Display for MemberOf {
10484 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10485 f.write_fmt(format_args!("{0} MEMBER OF({1})", self.value, self.array))write!(f, "{} MEMBER OF({})", self.value, self.array)
10486 }
10487}
10488
10489#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ExportData {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "ExportData",
"options", &self.options, "query", &self.query, "connection",
&&self.connection)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ExportData {
#[inline]
fn clone(&self) -> ExportData {
ExportData {
options: ::core::clone::Clone::clone(&self.options),
query: ::core::clone::Clone::clone(&self.query),
connection: ::core::clone::Clone::clone(&self.connection),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ExportData {
#[inline]
fn eq(&self, other: &ExportData) -> bool {
self.options == other.options && self.query == other.query &&
self.connection == other.connection
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ExportData {
#[inline]
fn partial_cmp(&self, other: &ExportData)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.options,
&other.options) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.query,
&other.query) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.connection,
&other.connection),
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ExportData {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ExportData {
#[inline]
fn cmp(&self, other: &ExportData) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.options, &other.options) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.query, &other.query) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.connection, &other.connection),
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ExportData {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.options, state);
::core::hash::Hash::hash(&self.query, state);
::core::hash::Hash::hash(&self.connection, state)
}
}Hash)]
10490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10491#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ExportData {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.options, visitor)?;
sqlparser::ast::Visit::visit(&self.query, visitor)?;
sqlparser::ast::Visit::visit(&self.connection, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for ExportData {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.options, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.query, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.connection, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10492pub struct ExportData {
10493 pub options: Vec<SqlOption>,
10494 pub query: Box<Query>,
10495 pub connection: Option<ObjectName>,
10496}
10497
10498impl fmt::Display for ExportData {
10499 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10500 if let Some(connection) = &self.connection {
10501 f.write_fmt(format_args!("EXPORT DATA WITH CONNECTION {2} OPTIONS({0}) AS {1}",
display_comma_separated(&self.options), self.query, connection))write!(
10502 f,
10503 "EXPORT DATA WITH CONNECTION {connection} OPTIONS({}) AS {}",
10504 display_comma_separated(&self.options),
10505 self.query
10506 )
10507 } else {
10508 f.write_fmt(format_args!("EXPORT DATA OPTIONS({0}) AS {1}",
display_comma_separated(&self.options), self.query))write!(
10509 f,
10510 "EXPORT DATA OPTIONS({}) AS {}",
10511 display_comma_separated(&self.options),
10512 self.query
10513 )
10514 }
10515 }
10516}
10517#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateUser {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
let names: &'static _ =
&["or_replace", "if_not_exists", "name", "options", "with_tags",
"tags"];
let values: &[&dyn ::core::fmt::Debug] =
&[&self.or_replace, &self.if_not_exists, &self.name,
&self.options, &self.with_tags, &&self.tags];
::core::fmt::Formatter::debug_struct_fields_finish(f, "CreateUser",
names, values)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateUser {
#[inline]
fn clone(&self) -> CreateUser {
CreateUser {
or_replace: ::core::clone::Clone::clone(&self.or_replace),
if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
name: ::core::clone::Clone::clone(&self.name),
options: ::core::clone::Clone::clone(&self.options),
with_tags: ::core::clone::Clone::clone(&self.with_tags),
tags: ::core::clone::Clone::clone(&self.tags),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateUser {
#[inline]
fn eq(&self, other: &CreateUser) -> bool {
self.or_replace == other.or_replace &&
self.if_not_exists == other.if_not_exists &&
self.with_tags == other.with_tags && self.name == other.name
&& self.options == other.options && self.tags == other.tags
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateUser {
#[inline]
fn partial_cmp(&self, other: &CreateUser)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.or_replace,
&other.or_replace) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
&other.if_not_exists) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.name,
&other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.options,
&other.options) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.with_tags,
&other.with_tags) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.tags,
&other.tags),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateUser {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Ident>;
let _: ::core::cmp::AssertParamIsEq<KeyValueOptions>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateUser {
#[inline]
fn cmp(&self, other: &CreateUser) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.or_replace, &other.or_replace) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.if_not_exists,
&other.if_not_exists) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.options, &other.options) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.with_tags,
&other.with_tags) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.tags, &other.tags),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateUser {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.or_replace, state);
::core::hash::Hash::hash(&self.if_not_exists, state);
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.options, state);
::core::hash::Hash::hash(&self.with_tags, state);
::core::hash::Hash::hash(&self.tags, state)
}
}Hash)]
10526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10527#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateUser {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.or_replace, visitor)?;
sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.options, visitor)?;
sqlparser::ast::Visit::visit(&self.with_tags, visitor)?;
sqlparser::ast::Visit::visit(&self.tags, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateUser {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.or_replace, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.if_not_exists, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.options, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.with_tags, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.tags, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10528pub struct CreateUser {
10529 pub or_replace: bool,
10530 pub if_not_exists: bool,
10531 pub name: Ident,
10532 pub options: KeyValueOptions,
10533 pub with_tags: bool,
10534 pub tags: KeyValueOptions,
10535}
10536
10537impl fmt::Display for CreateUser {
10538 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10539 f.write_fmt(format_args!("CREATE"))write!(f, "CREATE")?;
10540 if self.or_replace {
10541 f.write_fmt(format_args!(" OR REPLACE"))write!(f, " OR REPLACE")?;
10542 }
10543 f.write_fmt(format_args!(" USER"))write!(f, " USER")?;
10544 if self.if_not_exists {
10545 f.write_fmt(format_args!(" IF NOT EXISTS"))write!(f, " IF NOT EXISTS")?;
10546 }
10547 f.write_fmt(format_args!(" {0}", self.name))write!(f, " {}", self.name)?;
10548 if !self.options.options.is_empty() {
10549 f.write_fmt(format_args!(" {0}", self.options))write!(f, " {}", self.options)?;
10550 }
10551 if !self.tags.options.is_empty() {
10552 if self.with_tags {
10553 f.write_fmt(format_args!(" WITH"))write!(f, " WITH")?;
10554 }
10555 f.write_fmt(format_args!(" TAG ({0})", self.tags))write!(f, " TAG ({})", self.tags)?;
10556 }
10557 Ok(())
10558 }
10559}
10560
10561#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateTableLikeKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
match self {
CreateTableLikeKind::Parenthesized(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f,
"Parenthesized", &__self_0),
CreateTableLikeKind::Plain(__self_0) =>
::core::fmt::Formatter::debug_tuple_field1_finish(f, "Plain",
&__self_0),
}
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateTableLikeKind {
#[inline]
fn clone(&self) -> CreateTableLikeKind {
match self {
CreateTableLikeKind::Parenthesized(__self_0) =>
CreateTableLikeKind::Parenthesized(::core::clone::Clone::clone(__self_0)),
CreateTableLikeKind::Plain(__self_0) =>
CreateTableLikeKind::Plain(::core::clone::Clone::clone(__self_0)),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateTableLikeKind {
#[inline]
fn eq(&self, other: &CreateTableLikeKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr &&
match (self, other) {
(CreateTableLikeKind::Parenthesized(__self_0),
CreateTableLikeKind::Parenthesized(__arg1_0)) =>
__self_0 == __arg1_0,
(CreateTableLikeKind::Plain(__self_0),
CreateTableLikeKind::Plain(__arg1_0)) =>
__self_0 == __arg1_0,
_ => unsafe { ::core::intrinsics::unreachable() }
}
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateTableLikeKind {
#[inline]
fn partial_cmp(&self, other: &CreateTableLikeKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match (self, other) {
(CreateTableLikeKind::Parenthesized(__self_0),
CreateTableLikeKind::Parenthesized(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
(CreateTableLikeKind::Plain(__self_0),
CreateTableLikeKind::Plain(__arg1_0)) =>
::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
_ =>
::core::cmp::PartialOrd::partial_cmp(&__self_discr,
&__arg1_discr),
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateTableLikeKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<CreateTableLike>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateTableLikeKind {
#[inline]
fn cmp(&self, other: &CreateTableLikeKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
::core::cmp::Ordering::Equal =>
match (self, other) {
(CreateTableLikeKind::Parenthesized(__self_0),
CreateTableLikeKind::Parenthesized(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
(CreateTableLikeKind::Plain(__self_0),
CreateTableLikeKind::Plain(__arg1_0)) =>
::core::cmp::Ord::cmp(__self_0, __arg1_0),
_ => unsafe { ::core::intrinsics::unreachable() }
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateTableLikeKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state);
match self {
CreateTableLikeKind::Parenthesized(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
CreateTableLikeKind::Plain(__self_0) =>
::core::hash::Hash::hash(__self_0, state),
}
}
}Hash)]
10566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10567#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateTableLikeKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Parenthesized(_0) => {
sqlparser::ast::Visit::visit(_0, visitor)?;
}
Self::Plain(_0) => { sqlparser::ast::Visit::visit(_0, visitor)?; }
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateTableLikeKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Parenthesized(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
Self::Plain(_0) => {
sqlparser::ast::VisitMut::visit(_0, visitor)?;
}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10568pub enum CreateTableLikeKind {
10569 Parenthesized(CreateTableLike),
10574 Plain(CreateTableLike),
10580}
10581
10582#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateTableLikeDefaults {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
CreateTableLikeDefaults::Including => "Including",
CreateTableLikeDefaults::Excluding => "Excluding",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for CreateTableLikeDefaults { }Copy, #[automatically_derived]
impl ::core::clone::Clone for CreateTableLikeDefaults {
#[inline]
fn clone(&self) -> CreateTableLikeDefaults { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateTableLikeDefaults {
#[inline]
fn eq(&self, other: &CreateTableLikeDefaults) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateTableLikeDefaults {
#[inline]
fn partial_cmp(&self, other: &CreateTableLikeDefaults)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateTableLikeDefaults {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateTableLikeDefaults {
#[inline]
fn cmp(&self, other: &CreateTableLikeDefaults) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateTableLikeDefaults {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10584#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateTableLikeDefaults {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Including => {} Self::Excluding => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateTableLikeDefaults {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::Including => {} Self::Excluding => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10585pub enum CreateTableLikeDefaults {
10586 Including,
10587 Excluding,
10588}
10589
10590impl fmt::Display for CreateTableLikeDefaults {
10591 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10592 match self {
10593 CreateTableLikeDefaults::Including => f.write_fmt(format_args!("INCLUDING DEFAULTS"))write!(f, "INCLUDING DEFAULTS"),
10594 CreateTableLikeDefaults::Excluding => f.write_fmt(format_args!("EXCLUDING DEFAULTS"))write!(f, "EXCLUDING DEFAULTS"),
10595 }
10596 }
10597}
10598
10599#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateTableLike {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"CreateTableLike", "name", &self.name, "defaults",
&&self.defaults)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateTableLike {
#[inline]
fn clone(&self) -> CreateTableLike {
CreateTableLike {
name: ::core::clone::Clone::clone(&self.name),
defaults: ::core::clone::Clone::clone(&self.defaults),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateTableLike {
#[inline]
fn eq(&self, other: &CreateTableLike) -> bool {
self.name == other.name && self.defaults == other.defaults
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateTableLike {
#[inline]
fn partial_cmp(&self, other: &CreateTableLike)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
::core::cmp::PartialOrd::partial_cmp(&self.defaults,
&other.defaults),
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateTableLike {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<ObjectName>;
let _: ::core::cmp::AssertParamIsEq<Option<CreateTableLikeDefaults>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateTableLike {
#[inline]
fn cmp(&self, other: &CreateTableLike) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.name, &other.name) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.defaults, &other.defaults),
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateTableLike {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.name, state);
::core::hash::Hash::hash(&self.defaults, state)
}
}Hash)]
10600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10601#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateTableLike {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.name, visitor)?;
sqlparser::ast::Visit::visit(&self.defaults, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for CreateTableLike {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.defaults, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10602pub struct CreateTableLike {
10603 pub name: ObjectName,
10604 pub defaults: Option<CreateTableLikeDefaults>,
10605}
10606
10607impl fmt::Display for CreateTableLike {
10608 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10609 f.write_fmt(format_args!("LIKE {0}", self.name))write!(f, "LIKE {}", self.name)?;
10610 if let Some(defaults) = &self.defaults {
10611 f.write_fmt(format_args!(" {0}", defaults))write!(f, " {defaults}")?;
10612 }
10613 Ok(())
10614 }
10615}
10616
10617#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RefreshModeKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
RefreshModeKind::Auto => "Auto",
RefreshModeKind::Full => "Full",
RefreshModeKind::Incremental => "Incremental",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for RefreshModeKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for RefreshModeKind {
#[inline]
fn clone(&self) -> RefreshModeKind { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RefreshModeKind {
#[inline]
fn eq(&self, other: &RefreshModeKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RefreshModeKind {
#[inline]
fn partial_cmp(&self, other: &RefreshModeKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RefreshModeKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RefreshModeKind {
#[inline]
fn cmp(&self, other: &RefreshModeKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RefreshModeKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10622#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RefreshModeKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Auto => {}
Self::Full => {}
Self::Incremental => {}
}
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for RefreshModeKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self {
Self::Auto => {}
Self::Full => {}
Self::Incremental => {}
}
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10623pub enum RefreshModeKind {
10624 Auto,
10625 Full,
10626 Incremental,
10627}
10628
10629impl fmt::Display for RefreshModeKind {
10630 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10631 match self {
10632 RefreshModeKind::Auto => f.write_fmt(format_args!("AUTO"))write!(f, "AUTO"),
10633 RefreshModeKind::Full => f.write_fmt(format_args!("FULL"))write!(f, "FULL"),
10634 RefreshModeKind::Incremental => f.write_fmt(format_args!("INCREMENTAL"))write!(f, "INCREMENTAL"),
10635 }
10636 }
10637}
10638
10639#[derive(#[automatically_derived]
impl ::core::fmt::Debug for InitializeKind {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::write_str(f,
match self {
InitializeKind::OnCreate => "OnCreate",
InitializeKind::OnSchedule => "OnSchedule",
})
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for InitializeKind { }Copy, #[automatically_derived]
impl ::core::clone::Clone for InitializeKind {
#[inline]
fn clone(&self) -> InitializeKind { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for InitializeKind {
#[inline]
fn eq(&self, other: &InitializeKind) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for InitializeKind {
#[inline]
fn partial_cmp(&self, other: &InitializeKind)
-> ::core::option::Option<::core::cmp::Ordering> {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for InitializeKind {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for InitializeKind {
#[inline]
fn cmp(&self, other: &InitializeKind) -> ::core::cmp::Ordering {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for InitializeKind {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
let __self_discr = ::core::intrinsics::discriminant_value(self);
::core::hash::Hash::hash(&__self_discr, state)
}
}Hash)]
10643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10644#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for InitializeKind {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::OnCreate => {} Self::OnSchedule => {} }
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for InitializeKind {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
match self { Self::OnCreate => {} Self::OnSchedule => {} }
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10645pub enum InitializeKind {
10646 OnCreate,
10647 OnSchedule,
10648}
10649
10650impl fmt::Display for InitializeKind {
10651 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10652 match self {
10653 InitializeKind::OnCreate => f.write_fmt(format_args!("ON_CREATE"))write!(f, "ON_CREATE"),
10654 InitializeKind::OnSchedule => f.write_fmt(format_args!("ON_SCHEDULE"))write!(f, "ON_SCHEDULE"),
10655 }
10656 }
10657}
10658
10659#[derive(#[automatically_derived]
impl ::core::fmt::Debug for VacuumStatement {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
let names: &'static _ =
&["full", "sort_only", "delete_only", "reindex", "recluster",
"table_name", "threshold", "boost"];
let values: &[&dyn ::core::fmt::Debug] =
&[&self.full, &self.sort_only, &self.delete_only, &self.reindex,
&self.recluster, &self.table_name, &self.threshold,
&&self.boost];
::core::fmt::Formatter::debug_struct_fields_finish(f,
"VacuumStatement", names, values)
}
}Debug, #[automatically_derived]
impl ::core::clone::Clone for VacuumStatement {
#[inline]
fn clone(&self) -> VacuumStatement {
VacuumStatement {
full: ::core::clone::Clone::clone(&self.full),
sort_only: ::core::clone::Clone::clone(&self.sort_only),
delete_only: ::core::clone::Clone::clone(&self.delete_only),
reindex: ::core::clone::Clone::clone(&self.reindex),
recluster: ::core::clone::Clone::clone(&self.recluster),
table_name: ::core::clone::Clone::clone(&self.table_name),
threshold: ::core::clone::Clone::clone(&self.threshold),
boost: ::core::clone::Clone::clone(&self.boost),
}
}
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for VacuumStatement {
#[inline]
fn eq(&self, other: &VacuumStatement) -> bool {
self.full == other.full && self.sort_only == other.sort_only &&
self.delete_only == other.delete_only &&
self.reindex == other.reindex &&
self.recluster == other.recluster &&
self.boost == other.boost &&
self.table_name == other.table_name &&
self.threshold == other.threshold
}
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for VacuumStatement {
#[inline]
fn partial_cmp(&self, other: &VacuumStatement)
-> ::core::option::Option<::core::cmp::Ordering> {
match ::core::cmp::PartialOrd::partial_cmp(&self.full, &other.full) {
::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
match ::core::cmp::PartialOrd::partial_cmp(&self.sort_only,
&other.sort_only) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.delete_only,
&other.delete_only) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.reindex,
&other.reindex) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.recluster,
&other.recluster) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
&other.table_name) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
match ::core::cmp::PartialOrd::partial_cmp(&self.threshold,
&other.threshold) {
::core::option::Option::Some(::core::cmp::Ordering::Equal)
=>
::core::cmp::PartialOrd::partial_cmp(&self.boost,
&other.boost),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for VacuumStatement {
#[inline]
#[doc(hidden)]
#[coverage(off)]
fn assert_receiver_is_total_eq(&self) {
let _: ::core::cmp::AssertParamIsEq<bool>;
let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
let _: ::core::cmp::AssertParamIsEq<Option<Value>>;
}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for VacuumStatement {
#[inline]
fn cmp(&self, other: &VacuumStatement) -> ::core::cmp::Ordering {
match ::core::cmp::Ord::cmp(&self.full, &other.full) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.sort_only, &other.sort_only)
{
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.delete_only,
&other.delete_only) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.reindex, &other.reindex) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.recluster,
&other.recluster) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.table_name,
&other.table_name) {
::core::cmp::Ordering::Equal =>
match ::core::cmp::Ord::cmp(&self.threshold,
&other.threshold) {
::core::cmp::Ordering::Equal =>
::core::cmp::Ord::cmp(&self.boost, &other.boost),
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
},
cmp => cmp,
}
}
}Ord, #[automatically_derived]
impl ::core::hash::Hash for VacuumStatement {
#[inline]
fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
::core::hash::Hash::hash(&self.full, state);
::core::hash::Hash::hash(&self.sort_only, state);
::core::hash::Hash::hash(&self.delete_only, state);
::core::hash::Hash::hash(&self.reindex, state);
::core::hash::Hash::hash(&self.recluster, state);
::core::hash::Hash::hash(&self.table_name, state);
::core::hash::Hash::hash(&self.threshold, state);
::core::hash::Hash::hash(&self.boost, state)
}
}Hash)]
10666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10667#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for VacuumStatement {
fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::Visit::visit(&self.full, visitor)?;
sqlparser::ast::Visit::visit(&self.sort_only, visitor)?;
sqlparser::ast::Visit::visit(&self.delete_only, visitor)?;
sqlparser::ast::Visit::visit(&self.reindex, visitor)?;
sqlparser::ast::Visit::visit(&self.recluster, visitor)?;
sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
sqlparser::ast::Visit::visit(&self.threshold, visitor)?;
sqlparser::ast::Visit::visit(&self.boost, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}Visit, impl sqlparser::ast::VisitMut for VacuumStatement {
fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
-> ::std::ops::ControlFlow<V::Break> {
sqlparser::ast::VisitMut::visit(&mut self.full, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.sort_only, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.delete_only, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.reindex, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.recluster, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.table_name, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.threshold, visitor)?;
sqlparser::ast::VisitMut::visit(&mut self.boost, visitor)?;
::std::ops::ControlFlow::Continue(())
}
}VisitMut))]
10668pub struct VacuumStatement {
10669 pub full: bool,
10670 pub sort_only: bool,
10671 pub delete_only: bool,
10672 pub reindex: bool,
10673 pub recluster: bool,
10674 pub table_name: Option<ObjectName>,
10675 pub threshold: Option<Value>,
10676 pub boost: bool,
10677}
10678
10679impl fmt::Display for VacuumStatement {
10680 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10681 f.write_fmt(format_args!("VACUUM{0}{1}{2}{3}{4}",
if self.full { " FULL" } else { "" },
if self.sort_only { " SORT ONLY" } else { "" },
if self.delete_only { " DELETE ONLY" } else { "" },
if self.reindex { " REINDEX" } else { "" },
if self.recluster { " RECLUSTER" } else { "" }))write!(
10682 f,
10683 "VACUUM{}{}{}{}{}",
10684 if self.full { " FULL" } else { "" },
10685 if self.sort_only { " SORT ONLY" } else { "" },
10686 if self.delete_only { " DELETE ONLY" } else { "" },
10687 if self.reindex { " REINDEX" } else { "" },
10688 if self.recluster { " RECLUSTER" } else { "" },
10689 )?;
10690 if let Some(table_name) = &self.table_name {
10691 f.write_fmt(format_args!(" {0}", table_name))write!(f, " {table_name}")?;
10692 }
10693 if let Some(threshold) = &self.threshold {
10694 f.write_fmt(format_args!(" TO {0} PERCENT", threshold))write!(f, " TO {threshold} PERCENT")?;
10695 }
10696 if self.boost {
10697 f.write_fmt(format_args!(" BOOST"))write!(f, " BOOST")?;
10698 }
10699 Ok(())
10700 }
10701}
10702
10703impl From<Set> for Statement {
10704 fn from(s: Set) -> Self {
10705 Self::Set(s)
10706 }
10707}
10708
10709impl From<Query> for Statement {
10710 fn from(q: Query) -> Self {
10711 Box::new(q).into()
10712 }
10713}
10714
10715impl From<Box<Query>> for Statement {
10716 fn from(q: Box<Query>) -> Self {
10717 Self::Query(q)
10718 }
10719}
10720
10721impl From<Insert> for Statement {
10722 fn from(i: Insert) -> Self {
10723 Self::Insert(i)
10724 }
10725}
10726
10727impl From<CaseStatement> for Statement {
10728 fn from(c: CaseStatement) -> Self {
10729 Self::Case(c)
10730 }
10731}
10732
10733impl From<IfStatement> for Statement {
10734 fn from(i: IfStatement) -> Self {
10735 Self::If(i)
10736 }
10737}
10738
10739impl From<WhileStatement> for Statement {
10740 fn from(w: WhileStatement) -> Self {
10741 Self::While(w)
10742 }
10743}
10744
10745impl From<RaiseStatement> for Statement {
10746 fn from(r: RaiseStatement) -> Self {
10747 Self::Raise(r)
10748 }
10749}
10750
10751impl From<Function> for Statement {
10752 fn from(f: Function) -> Self {
10753 Self::Call(f)
10754 }
10755}
10756
10757impl From<OpenStatement> for Statement {
10758 fn from(o: OpenStatement) -> Self {
10759 Self::Open(o)
10760 }
10761}
10762
10763impl From<Delete> for Statement {
10764 fn from(d: Delete) -> Self {
10765 Self::Delete(d)
10766 }
10767}
10768
10769impl From<CreateTable> for Statement {
10770 fn from(c: CreateTable) -> Self {
10771 Self::CreateTable(c)
10772 }
10773}
10774
10775impl From<CreateIndex> for Statement {
10776 fn from(c: CreateIndex) -> Self {
10777 Self::CreateIndex(c)
10778 }
10779}
10780
10781impl From<CreateServerStatement> for Statement {
10782 fn from(c: CreateServerStatement) -> Self {
10783 Self::CreateServer(c)
10784 }
10785}
10786
10787impl From<CreateConnector> for Statement {
10788 fn from(c: CreateConnector) -> Self {
10789 Self::CreateConnector(c)
10790 }
10791}
10792
10793impl From<AlterSchema> for Statement {
10794 fn from(a: AlterSchema) -> Self {
10795 Self::AlterSchema(a)
10796 }
10797}
10798
10799impl From<AlterType> for Statement {
10800 fn from(a: AlterType) -> Self {
10801 Self::AlterType(a)
10802 }
10803}
10804
10805impl From<DropDomain> for Statement {
10806 fn from(d: DropDomain) -> Self {
10807 Self::DropDomain(d)
10808 }
10809}
10810
10811impl From<ShowCharset> for Statement {
10812 fn from(s: ShowCharset) -> Self {
10813 Self::ShowCharset(s)
10814 }
10815}
10816
10817impl From<ShowObjects> for Statement {
10818 fn from(s: ShowObjects) -> Self {
10819 Self::ShowObjects(s)
10820 }
10821}
10822
10823impl From<Use> for Statement {
10824 fn from(u: Use) -> Self {
10825 Self::Use(u)
10826 }
10827}
10828
10829impl From<CreateFunction> for Statement {
10830 fn from(c: CreateFunction) -> Self {
10831 Self::CreateFunction(c)
10832 }
10833}
10834
10835impl From<CreateTrigger> for Statement {
10836 fn from(c: CreateTrigger) -> Self {
10837 Self::CreateTrigger(c)
10838 }
10839}
10840
10841impl From<DropTrigger> for Statement {
10842 fn from(d: DropTrigger) -> Self {
10843 Self::DropTrigger(d)
10844 }
10845}
10846
10847impl From<DenyStatement> for Statement {
10848 fn from(d: DenyStatement) -> Self {
10849 Self::Deny(d)
10850 }
10851}
10852
10853impl From<CreateDomain> for Statement {
10854 fn from(c: CreateDomain) -> Self {
10855 Self::CreateDomain(c)
10856 }
10857}
10858
10859impl From<RenameTable> for Statement {
10860 fn from(r: RenameTable) -> Self {
10861 <[_]>::into_vec(::alloc::boxed::box_new([r]))vec![r].into()
10862 }
10863}
10864
10865impl From<Vec<RenameTable>> for Statement {
10866 fn from(r: Vec<RenameTable>) -> Self {
10867 Self::RenameTable(r)
10868 }
10869}
10870
10871impl From<PrintStatement> for Statement {
10872 fn from(p: PrintStatement) -> Self {
10873 Self::Print(p)
10874 }
10875}
10876
10877impl From<ReturnStatement> for Statement {
10878 fn from(r: ReturnStatement) -> Self {
10879 Self::Return(r)
10880 }
10881}
10882
10883impl From<ExportData> for Statement {
10884 fn from(e: ExportData) -> Self {
10885 Self::ExportData(e)
10886 }
10887}
10888
10889impl From<CreateUser> for Statement {
10890 fn from(c: CreateUser) -> Self {
10891 Self::CreateUser(c)
10892 }
10893}
10894
10895impl From<VacuumStatement> for Statement {
10896 fn from(v: VacuumStatement) -> Self {
10897 Self::Vacuum(v)
10898 }
10899}
10900
10901#[cfg(test)]
10902mod tests {
10903 use crate::tokenizer::Location;
10904
10905 use super::*;
10906
10907 #[test]
10908 fn test_window_frame_default() {
10909 let window_frame = WindowFrame::default();
10910 assert_eq!(WindowFrameBound::Preceding(None), window_frame.start_bound);
10911 }
10912
10913 #[test]
10914 fn test_grouping_sets_display() {
10915 let grouping_sets = Expr::GroupingSets(vec![
10917 vec![Expr::Identifier(Ident::new("a"))],
10918 vec![Expr::Identifier(Ident::new("b"))],
10919 ]);
10920 assert_eq!("GROUPING SETS ((a), (b))", format!("{grouping_sets}"));
10921
10922 let grouping_sets = Expr::GroupingSets(vec![vec![
10924 Expr::Identifier(Ident::new("a")),
10925 Expr::Identifier(Ident::new("b")),
10926 ]]);
10927 assert_eq!("GROUPING SETS ((a, b))", format!("{grouping_sets}"));
10928
10929 let grouping_sets = Expr::GroupingSets(vec![
10931 vec![
10932 Expr::Identifier(Ident::new("a")),
10933 Expr::Identifier(Ident::new("b")),
10934 ],
10935 vec![
10936 Expr::Identifier(Ident::new("c")),
10937 Expr::Identifier(Ident::new("d")),
10938 ],
10939 ]);
10940 assert_eq!("GROUPING SETS ((a, b), (c, d))", format!("{grouping_sets}"));
10941 }
10942
10943 #[test]
10944 fn test_rollup_display() {
10945 let rollup = Expr::Rollup(vec![vec![Expr::Identifier(Ident::new("a"))]]);
10946 assert_eq!("ROLLUP (a)", format!("{rollup}"));
10947
10948 let rollup = Expr::Rollup(vec![vec![
10949 Expr::Identifier(Ident::new("a")),
10950 Expr::Identifier(Ident::new("b")),
10951 ]]);
10952 assert_eq!("ROLLUP ((a, b))", format!("{rollup}"));
10953
10954 let rollup = Expr::Rollup(vec![
10955 vec![Expr::Identifier(Ident::new("a"))],
10956 vec![Expr::Identifier(Ident::new("b"))],
10957 ]);
10958 assert_eq!("ROLLUP (a, b)", format!("{rollup}"));
10959
10960 let rollup = Expr::Rollup(vec![
10961 vec![Expr::Identifier(Ident::new("a"))],
10962 vec![
10963 Expr::Identifier(Ident::new("b")),
10964 Expr::Identifier(Ident::new("c")),
10965 ],
10966 vec![Expr::Identifier(Ident::new("d"))],
10967 ]);
10968 assert_eq!("ROLLUP (a, (b, c), d)", format!("{rollup}"));
10969 }
10970
10971 #[test]
10972 fn test_cube_display() {
10973 let cube = Expr::Cube(vec![vec![Expr::Identifier(Ident::new("a"))]]);
10974 assert_eq!("CUBE (a)", format!("{cube}"));
10975
10976 let cube = Expr::Cube(vec![vec![
10977 Expr::Identifier(Ident::new("a")),
10978 Expr::Identifier(Ident::new("b")),
10979 ]]);
10980 assert_eq!("CUBE ((a, b))", format!("{cube}"));
10981
10982 let cube = Expr::Cube(vec![
10983 vec![Expr::Identifier(Ident::new("a"))],
10984 vec![Expr::Identifier(Ident::new("b"))],
10985 ]);
10986 assert_eq!("CUBE (a, b)", format!("{cube}"));
10987
10988 let cube = Expr::Cube(vec![
10989 vec![Expr::Identifier(Ident::new("a"))],
10990 vec![
10991 Expr::Identifier(Ident::new("b")),
10992 Expr::Identifier(Ident::new("c")),
10993 ],
10994 vec![Expr::Identifier(Ident::new("d"))],
10995 ]);
10996 assert_eq!("CUBE (a, (b, c), d)", format!("{cube}"));
10997 }
10998
10999 #[test]
11000 fn test_interval_display() {
11001 let interval = Expr::Interval(Interval {
11002 value: Box::new(Expr::Value(
11003 Value::SingleQuotedString(String::from("123:45.67")).with_empty_span(),
11004 )),
11005 leading_field: Some(DateTimeField::Minute),
11006 leading_precision: Some(10),
11007 last_field: Some(DateTimeField::Second),
11008 fractional_seconds_precision: Some(9),
11009 });
11010 assert_eq!(
11011 "INTERVAL '123:45.67' MINUTE (10) TO SECOND (9)",
11012 format!("{interval}"),
11013 );
11014
11015 let interval = Expr::Interval(Interval {
11016 value: Box::new(Expr::Value(
11017 Value::SingleQuotedString(String::from("5")).with_empty_span(),
11018 )),
11019 leading_field: Some(DateTimeField::Second),
11020 leading_precision: Some(1),
11021 last_field: None,
11022 fractional_seconds_precision: Some(3),
11023 });
11024 assert_eq!("INTERVAL '5' SECOND (1, 3)", format!("{interval}"));
11025 }
11026
11027 #[test]
11028 fn test_one_or_many_with_parens_deref() {
11029 use core::ops::Index;
11030
11031 let one = OneOrManyWithParens::One("a");
11032
11033 assert_eq!(one.deref(), &["a"]);
11034 assert_eq!(<OneOrManyWithParens<_> as Deref>::deref(&one), &["a"]);
11035
11036 assert_eq!(one[0], "a");
11037 assert_eq!(one.index(0), &"a");
11038 assert_eq!(
11039 <<OneOrManyWithParens<_> as Deref>::Target as Index<usize>>::index(&one, 0),
11040 &"a"
11041 );
11042
11043 assert_eq!(one.len(), 1);
11044 assert_eq!(<OneOrManyWithParens<_> as Deref>::Target::len(&one), 1);
11045
11046 let many1 = OneOrManyWithParens::Many(vec!["b"]);
11047
11048 assert_eq!(many1.deref(), &["b"]);
11049 assert_eq!(<OneOrManyWithParens<_> as Deref>::deref(&many1), &["b"]);
11050
11051 assert_eq!(many1[0], "b");
11052 assert_eq!(many1.index(0), &"b");
11053 assert_eq!(
11054 <<OneOrManyWithParens<_> as Deref>::Target as Index<usize>>::index(&many1, 0),
11055 &"b"
11056 );
11057
11058 assert_eq!(many1.len(), 1);
11059 assert_eq!(<OneOrManyWithParens<_> as Deref>::Target::len(&many1), 1);
11060
11061 let many2 = OneOrManyWithParens::Many(vec!["c", "d"]);
11062
11063 assert_eq!(many2.deref(), &["c", "d"]);
11064 assert_eq!(
11065 <OneOrManyWithParens<_> as Deref>::deref(&many2),
11066 &["c", "d"]
11067 );
11068
11069 assert_eq!(many2[0], "c");
11070 assert_eq!(many2.index(0), &"c");
11071 assert_eq!(
11072 <<OneOrManyWithParens<_> as Deref>::Target as Index<usize>>::index(&many2, 0),
11073 &"c"
11074 );
11075
11076 assert_eq!(many2[1], "d");
11077 assert_eq!(many2.index(1), &"d");
11078 assert_eq!(
11079 <<OneOrManyWithParens<_> as Deref>::Target as Index<usize>>::index(&many2, 1),
11080 &"d"
11081 );
11082
11083 assert_eq!(many2.len(), 2);
11084 assert_eq!(<OneOrManyWithParens<_> as Deref>::Target::len(&many2), 2);
11085 }
11086
11087 #[test]
11088 fn test_one_or_many_with_parens_as_ref() {
11089 let one = OneOrManyWithParens::One("a");
11090
11091 assert_eq!(one.as_ref(), &["a"]);
11092 assert_eq!(<OneOrManyWithParens<_> as AsRef<_>>::as_ref(&one), &["a"]);
11093
11094 let many1 = OneOrManyWithParens::Many(vec!["b"]);
11095
11096 assert_eq!(many1.as_ref(), &["b"]);
11097 assert_eq!(<OneOrManyWithParens<_> as AsRef<_>>::as_ref(&many1), &["b"]);
11098
11099 let many2 = OneOrManyWithParens::Many(vec!["c", "d"]);
11100
11101 assert_eq!(many2.as_ref(), &["c", "d"]);
11102 assert_eq!(
11103 <OneOrManyWithParens<_> as AsRef<_>>::as_ref(&many2),
11104 &["c", "d"]
11105 );
11106 }
11107
11108 #[test]
11109 fn test_one_or_many_with_parens_ref_into_iter() {
11110 let one = OneOrManyWithParens::One("a");
11111
11112 assert_eq!(Vec::from_iter(&one), vec![&"a"]);
11113
11114 let many1 = OneOrManyWithParens::Many(vec!["b"]);
11115
11116 assert_eq!(Vec::from_iter(&many1), vec![&"b"]);
11117
11118 let many2 = OneOrManyWithParens::Many(vec!["c", "d"]);
11119
11120 assert_eq!(Vec::from_iter(&many2), vec![&"c", &"d"]);
11121 }
11122
11123 #[test]
11124 fn test_one_or_many_with_parens_value_into_iter() {
11125 use core::iter::once;
11126
11127 fn test_steps<I>(ours: OneOrManyWithParens<usize>, inner: I, n: usize)
11129 where
11130 I: IntoIterator<Item = usize, IntoIter: DoubleEndedIterator + Clone> + Clone,
11131 {
11132 fn checks<I>(ours: OneOrManyWithParensIntoIter<usize>, inner: I)
11133 where
11134 I: Iterator<Item = usize> + Clone + DoubleEndedIterator,
11135 {
11136 assert_eq!(ours.size_hint(), inner.size_hint());
11137 assert_eq!(ours.clone().count(), inner.clone().count());
11138
11139 assert_eq!(
11140 ours.clone().fold(1, |a, v| a + v),
11141 inner.clone().fold(1, |a, v| a + v)
11142 );
11143
11144 assert_eq!(Vec::from_iter(ours.clone()), Vec::from_iter(inner.clone()));
11145 assert_eq!(
11146 Vec::from_iter(ours.clone().rev()),
11147 Vec::from_iter(inner.clone().rev())
11148 );
11149 }
11150
11151 let mut ours_next = ours.clone().into_iter();
11152 let mut inner_next = inner.clone().into_iter();
11153
11154 for _ in 0..n {
11155 checks(ours_next.clone(), inner_next.clone());
11156
11157 assert_eq!(ours_next.next(), inner_next.next());
11158 }
11159
11160 let mut ours_next_back = ours.clone().into_iter();
11161 let mut inner_next_back = inner.clone().into_iter();
11162
11163 for _ in 0..n {
11164 checks(ours_next_back.clone(), inner_next_back.clone());
11165
11166 assert_eq!(ours_next_back.next_back(), inner_next_back.next_back());
11167 }
11168
11169 let mut ours_mixed = ours.clone().into_iter();
11170 let mut inner_mixed = inner.clone().into_iter();
11171
11172 for i in 0..n {
11173 checks(ours_mixed.clone(), inner_mixed.clone());
11174
11175 if i % 2 == 0 {
11176 assert_eq!(ours_mixed.next_back(), inner_mixed.next_back());
11177 } else {
11178 assert_eq!(ours_mixed.next(), inner_mixed.next());
11179 }
11180 }
11181
11182 let mut ours_mixed2 = ours.into_iter();
11183 let mut inner_mixed2 = inner.into_iter();
11184
11185 for i in 0..n {
11186 checks(ours_mixed2.clone(), inner_mixed2.clone());
11187
11188 if i % 2 == 0 {
11189 assert_eq!(ours_mixed2.next(), inner_mixed2.next());
11190 } else {
11191 assert_eq!(ours_mixed2.next_back(), inner_mixed2.next_back());
11192 }
11193 }
11194 }
11195
11196 test_steps(OneOrManyWithParens::One(1), once(1), 3);
11197 test_steps(OneOrManyWithParens::Many(vec![2]), vec![2], 3);
11198 test_steps(OneOrManyWithParens::Many(vec![3, 4]), vec![3, 4], 4);
11199 }
11200
11201 #[test]
11204 fn test_ident_ord() {
11205 let mut a = Ident::with_span(Span::new(Location::new(1, 1), Location::new(1, 1)), "a");
11206 let mut b = Ident::with_span(Span::new(Location::new(2, 2), Location::new(2, 2)), "b");
11207
11208 assert!(a < b);
11209 std::mem::swap(&mut a.span, &mut b.span);
11210 assert!(a < b);
11211 }
11212}